You are here: Re: "asort" is not doing what it is supposed to do « PHP Programming Language « IT news, forums, messages
Re: "asort" is not doing what it is supposed to do

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация