Categories
How to write such a function in smarty?
usort($datings, function($a, $b) { $ad = strtotime($a['date']); $bd = strtotime($b['date']); if ($ad == $bd) { return 0; } return $ad < $bd ? -1 : 1; });
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question