D
D
Dmitry2021-11-19 13:11:56
Smarty
Dmitry, 2021-11-19 13:11:56

How to write such a function in smarty?

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 your question

Ask a Question

731 491 924 answers to any question