Advertisement
metalx1000

PHP - Reverse Alpha/Numeric Array

Jan 27th, 2012
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.15 KB | None | 0 0
  1. <?php
  2. $fruits = array("lemon", "orange", "banana", "apple");
  3. rsort($fruits);
  4. foreach ($fruits as $key => $val) {
  5.     echo "$key = $val\n";
  6. }
  7. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement