Wednesday, July 15, 2009

sorting array functions ?

1- sort($array)- is used for enumerated array(numeric array)
sorts the array element in asending order.

2- rsort($array)- used for enumerated array,sorts the array element in decending order.

3- asort($array)- used for associative array,sorts the array value in asending order.

4- arsort($array)- used for associative array,sorts the array value in decending order.

5- ksort($array)- used for associative array,sorts the array keys in asending order.

6- krsort($array)- used for associative array,sorts the array keys in decending order.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home