Answers for "sort data decending order accoding to date in php"

PHP
2

php array order by date

usort($array, function($a, $b) {
  return new DateTime($a['datetime']) <=> new DateTime($b['datetime']);
});
Posted by: Guest on January-09-2020

Code answers related to "sort data decending order accoding to date in php"

Browse Popular Code Answers by Language