Can anyone tell me what's wrong with the following?
<?php for($i=1;$i<=9999;$i++)
{
$filename = sprintf("%04d",$i); //filename is a zero padded string with four digit
if file_exists("./stock/$filename.htm")
{
echo "<a href=\"index.php?currentpage=viewitem&item=$filename\">"
}
}
?>
Thanks