How do I reverse sort the members of an array?
Again this takes the name of the array as its parameter and here's a little example for you:
<?php
$myworld = array("it","better","make","you");
rsort($myworld);
print_r($myworld);
?>
printing to the screen:
Array
(
[0] => you
[1] => make
[2] => it
[3] => better
)
Comment on this Question and Answer >>>
ASK A QUESTION
More arrays PHP Questions
sortHow can I display values in a two dimensional array?
How do I write my own sort function?
Hi. i have a music samples website. in one table, id like a different sample to appear every time the page is refreshed. how do i acheve this? how can i alterate and retrieve these bloody mp3's? surely i can use a PHP script? thankyou
How do I change: function wordlimit($string, $length = 50, $ellipsis = "...") { $words = explode(' ', strip_tags($string)); if (count($words) > $length) return implode(' ', array_slice($words, 0, $length)) . $ellipsis; else
