<?php$output = '';$cdb = new PDO('mysql:dbname=testdb;host=localhost', 'dbuser', 'dbpass');$res = $cdb->query("SELECT COUNT(*) AS imgtotal FROM images");$ct = $res->fetch(PDO::FETCH_ASSOC);for ($x = 0; $x < strlen($ct['imgtotal']); $x++) $output .= ' <img alt="' . $ct['imgtotal'][$x] . '" src="/ext/home/counters/default/' . $ct['imgtotal'][$x] . '.gif" />';echo $output;?>