Re: Arrays?

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

 



Nicholas Yim wrote:
> Hello William Stokes,
> 
> 1 write a callback function:
>   [php]
>   function cmp_forth_value($left,$right){
>     return $left[4]<$right?-1:($left[4]==$right[4]?0:1);

return $left[4]<$right[4]?-1:($left[4]==$right[4]?0:1);
                      ^^^
                   add this
>   }
>   [/php]
> 
> 2 use the usort function
> 
>   usort($test,'cmp_forth_value');
> 
> Best regards, 


-- 
Thanking You

Sumeet Shroff
http://www.prateeksha.com
Web Designers and PHP / Mysql Ecommerce Development, Mumbai India

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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