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);
Posts Tagged ‘array’
Feb 27 2008
PHP Array Pagination
This is a very easy to install pagination class that takes a PHP array and parses it into an array. To install into one of your personal array's start by including the main file and creating the pagination object. <?php include 'pagination.class.php'; $pagination = new pagination; ?> Once this is done, simply do the following [...]
Feb 27 2008
Using Arrays
Arrays are one of the most used properties in php, arrays are like a container they are very simple they can can be indentified by a key or a value and the value can also be an array and that's called a multi-dimentional array. Creating an array: <? $myArray = array("Value1", "Value2"); ?> By default [...]