Hey guys, I am new to this forum but it looks like a great place to ask.
I am a new to php but i reallly like it.
I just made this script to list the contents of a given directory, but when it does this i always go the message "Resource ID #1" at the top of the listing and i don't see this in my code any where, here is the code.
<?php
$counter = 0;
$directory = ".";
$opendir = opendir($directory);
echo $opendir;
// load array of files in $directory
while($files = readdir($opendir)) {
if ($files != "." && $files != "..") {
$file_array[$counter] = $files;
echo "$files<br>";
}
}
?>