$output = '';
$cdb = new PDO('mysql:dbname=xxxxxxxxxxx;host=localhost', 'xxxxxxxxxxxxx', 'xxxxxxxxxxxxxx');
$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=" /imageboard/ext/home/counters/default/' . $ct['imgtotal'][$x] . '.gif" width="40" height="80"/>';
return $output;