- print_r: documentation ( source)
- strtotime: documentation ( source)
- usort: documentation ( source)
<?php
$arr = [
"30-12-2024",
"28-12-2024",
"28-12-2024",
"28-12-2024",
"03-01-2025"
];
usort($arr, function ($a, $b) {
return strtotime($a) - strtotime($b);
});
print_r($arr);