I am writing a loop to create a thumbnail gallery. My code snippet is below (all that would matter) It works fine, except I need the variable $count to remain in a 001.jpg format, and not jump to 2.jpg
$count = 001;
$i = 0;
$total = $indexCount - 1 ;
while($count < $total){
echo("<td valign='top' align='center' width='100'><a href='image_viewer.php?item=photo$count.jpg&cust=$location' > <img src='$tbase/photo$count.jpg' border='0'></a><br><font class='text'>photo_$count.jpg</font>");
echo("</td>");
while($i == 5){
echo("</tr><tr><td height='10'></td></tr><tr>");
$i ++;
}