Sort problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Folks!

Anyone know a smart way to order file names?

An example to you guys picture what im saying is:

<?php

$serie[] = "Two And Half Man Season 1";
$serie[] = "Two And Half Man Season 4";
$serie[] = "Two And Half Man Season 2";
$serie[] = "Two And Half Man Season 3";
$serie[] = "Two And Half Man Season 10";
$serie[] = "Two And Half Man Season 9";

sort($serie);

print_r($serie);

?>

The result of this snippet is:

Array
(
    [0] => Two And Half Man Season 1    [1] => Two And Half Man Season
10    [2] => Two And Half Man Season 2
    [3] => Two And Half Man Season 3
    [4] => Two And Half Man Season 4
    [5] => Two And Half Man Season 9

)

Anyone knows how to solve this problem?


Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar <http://www.twitter.com/igorescobar>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux