Joshua44
11-15-2002, 03:59 PM
Is there some way to sort the files gotten by the opendir() function?
$newboard = strtolower($board);
$pat = "/1.php$/i";
$dir = opendir("$newboard/postdata/");
while(($filename = readdir($dir)) !== false) {
if ($filename == '.' || $filename == '..') continue;
if (preg_match($pat,$filename)) {
}
}
}
Right now I'm using that, but at first it would just get the files randomly. Now I have it so that it prints them backwards, and only two at a time. :( help?
$newboard = strtolower($board);
$pat = "/1.php$/i";
$dir = opendir("$newboard/postdata/");
while(($filename = readdir($dir)) !== false) {
if ($filename == '.' || $filename == '..') continue;
if (preg_match($pat,$filename)) {
}
}
}
Right now I'm using that, but at first it would just get the files randomly. Now I have it so that it prints them backwards, and only two at a time. :( help?
