Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array order by date

usort($array, function($a, $b) {
  return new DateTime($a['datetime']) <=> new DateTime($b['datetime']);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #array #order #date
ADD COMMENT
Topic
Name
7+2 =