Hi guys, I have a script which looks in a directory, pulls out all the files and sorts them by reverse date order. The file name schema is "yyyymmdd-the rest of the file".
Script: --- $interestingFile = array(); $interestingFiles = array(); $dir = opendir('/home/danceportal/www/uk/ian') or die( "Could not open dir" ); while($dirEntry = readdir($dir)){ if(ereg("summary", $dirEntry) || ereg("full", $dirEntry)){ array_push($interestingFile, $dirEntry); $date = explode("-", $dirEntry); $finished = explode(".", $date[0]); array_push( $interestingFiles, $finished[0]); } } sort($interestingFile, SORT_REGULAR); $count = count($interestingFile); $k = $count; $j = "0"; while($j < $count) { $k --; include $interestingFile[$k]; echo "<p>"; $j ++; } --- What I want to do is get today's date, then check each line against the date and only show the rest of the files with the next one to expire and so on. Could someone help me with this please? Cheers, Ian. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php