mechanics
Posted: Mon Oct 21, 2002 4:34 pm
<?
$num = 0;
if(!isset($count)) {$count = 0;}
if ($handle = opendir("../dread")) {
while (false !== ($file = readdir($handle)) && $num < ($count + 5)) {
if ($file != "." && $file != ".." && $file != "dread.php" && $file != "songimg.jpg" && $num >= $count) {
echo "<img src=\"songimg.jpg\"><a href=\"$file\">$file</a><BR>\n";
$num++;
}
else if($file != "." && $file != ".." && $file != "dread.php" && $file != "songimg.jpg") { $num++; }
}
closedir($handle);
}
?>
my code is correct and it works perfectly. i want to know how it decides what file to use when it increments the $num variable. if you all could shed some light on that i'd be gracious.
$num = 0;
if(!isset($count)) {$count = 0;}
if ($handle = opendir("../dread")) {
while (false !== ($file = readdir($handle)) && $num < ($count + 5)) {
if ($file != "." && $file != ".." && $file != "dread.php" && $file != "songimg.jpg" && $num >= $count) {
echo "<img src=\"songimg.jpg\"><a href=\"$file\">$file</a><BR>\n";
$num++;
}
else if($file != "." && $file != ".." && $file != "dread.php" && $file != "songimg.jpg") { $num++; }
}
closedir($handle);
}
?>
my code is correct and it works perfectly. i want to know how it decides what file to use when it increments the $num variable. if you all could shed some light on that i'd be gracious.