I\'m having a problem. I have a multidimensional array, that looks like this:
Array ( [0] => Array ( [0] => Testguy
function cmp($a, $b){ $a = strtotime($a[2]); $b = strtotime($b[2]); if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; } usort($array, "cmp");
Or for >= PHP 7
usort($array, function($a, $b){ return strtotime($a[2]) <=> strtotime($b[2]); });