* Thus wrote Labunski with modifications:
<?php
if ($handle = opendir('news')) {
while (false !== ($topic = readdir($handle))) {
if ($topic != "." && $topic != "..") {
while (false !== ($topic = readdir($handle)))
{
// this will never happen!!!!!!!!!
if($topic != "." && $topic != "..")
{
$topic=str_replace(".","",$topic);
array_push($sortArray,$topic);
}
}
// We are at the end of all the files
// snip all the other stuff.
// you're closing the file here so
// the next iteration of the loop it is no
// longer valid
closedir($handle);
}
}
?>
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php