Natsort reverse order (natrsort)


/ Published in: PHP
Save to your folder(s)

Just a function


Copy this code and paste it in your HTML
  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);

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.