note 34248 rejected from function.sort by betz

From: Date: Sat, 19 Jul 2003 18:35:33 +0000
Subject: note 34248 rejected from function.sort by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52391@lists.php.net to get a copy of this message
Note Submitter: namit@eircom.net ---- I have it Function but I want to sort the output on it, how can i do this. <? function list_files(){ $root = "gallery"; // Open a known directory, and proceed to read its contents if (is_dir($root)) { if ($dh = opendir($root)) { while (($file = readdir($dh)) !== false){ ////////////////////SORT THIS//////////////////// echo "<tr><td><center><a href=imageupload.php?dir=$root/$file border='0'>$file</a><br>\n</center></td></tr>"; } closedir($dh); } } } list_files() ?>

« previous php.notes (#52391) next »