Hello all, I am fairly new to PHP and I am trying to read files in the directory (gif files)and based on the names of the files create links on the page. The words within the file will be separated with underscores(02_13_2002_This_file_name.gif but I do not have to use underscores if it is going to make things easier). I am also trying to sort the names as they are represented as names/dates combination..
Could anyone help me to jump start this especially with splitting the name and sorting? Should I read the file names into an array and sort it? (read first 10 characters [date] split it - put into an array; then read the rest parse it and place into an array?) Here is what I have so far (basically reading files in a directory - not tested yet): <? $file_dir="other"; $dir=opendir($file_dir); while ($file=readdir($dir)) { if ($file !="." && $file !="..") { echo "< a href=".$file_dir."/".$file.">".$file."</a>"; } } ?> -- Best regards, Paul mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php