pinkolin

php sort

May 28th, 2020
752
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.13 KB | None | 0 0
  1.  usort($data['data']['item'], function($a, $b) {
  2.    return (strtotime($a['pubdate']) < strtotime($b['pubdate']) ? -1 : 1);
  3.  });
Add Comment
Please, Sign In to add comment