|
Posted by Franoise Debat on 02/14/07 09:28
Geoff Berrow wrote:
> Message-ID: <45d238b6$0$5081$ba4acef3@news.orange.fr> from Françoise
> Debat contained the following:
>
>>> That's probably easiest. Might be more fun to do a bubble sort though
>>> :-)
>> I'm sorry, I don't understand how to do either. Please can you point me
>> to an example I can learn from?
>
> <?php
>
> $path=$_SERVER['PATH_TRANSLATED'];
> $dir=dirname($path);
> $directory=str_replace("/","",strrchr($dir, "/"));
> echo"<h2>Files in $directory</h2>\n\n";
> if ($dh = opendir($dir)) {
> while (($file = readdir($dh)) !== false) {
> //print $dir . $file;
> if($file!="." && $file!=".." ){
> $files[]=$file;
> }
> }
> asort($files);
> closedir($dh);
> }
> foreach($files as $value){
> echo $value."<br>";
> }
>
> ?>
I cannot thank you enough - thank you so much.
Regards
Françoise
Navigation:
[Reply to this message]
|