Hello, I searching for function which will reverse order of array like this: $array[0]='something'; $array[1]='and'; $array[2]='or'; $array[3]='nothing'; PHP: to $array[0]='nothing'; $array[1]='or'; $array[2]='and'; $array[3]='something'; PHP: Thanks.
<?php $array[0]='something'; $array[1]='and'; $array[2]='or'; $array[3]='nothing'; $reversed = array_reverse($array); print_r($reversed); ?> PHP: Returns: Array ( [0] => nothing [1] => or [2] => and [3] => something ) Code (markup):
Ya, and is a great list of PHP array function here for your future reference: h_ttp://www.w3schools.com/PHP/php_ref_array.asp
Check out this too, it may help you later on. It's a link to the array functions section on the php.net manual. http://au2.php.net/manual/en/ref.array.php