arsort: Sort an array in reverse order and maintain index association : Array sort « Data Structure « PHP
- PHP
- Data Structure
- Array sort
arsort: Sort an array in reverse order and maintain index association
<?php
$states = array("Delaware","Pennsylvania","New Jersey");
arsort($states);
print_r($states);
// Array ( [1] => Pennsylvania [2] => New Jersey [0] => Delaware )
?>
Related examples in the same category