Posted By

kirik on 10/30/09


Tagged

reverse natsort natrsort


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

iroybot


Natsort reverse order (natrsort)


 / Published in: PHP
 

URL: http://ca.php.net/manual/en/function.natsort.php#94358

Just a function

  1. function natrsort(&$array)
  2. {
  3. natsort($array);
  4. $array = array_reverse($array);
  5. }
  6.  
  7. // Example:
  8. $arr = array("img12.png", "img2.png", "img1.png", "img10.png");
  9. natrsort($arr);
  10. print_r($arr);

Report this snippet  

You need to login to post a comment.