Feed Rss



Feb 27 2008

Sorting Arrays

category: PHP,Tutorials author:

You can sort an array in many different ways using PHP using many different functions, here are a few.

sort($array);
asort($array);
ksort($array);

These three different sorting functions all can be sorted in ascending order.

The reverse functions are:

rsort($array);
arsort($array);
krsort($array);

tag: , ,

Leave a Reply