Hi guys i want to sort value in multi dimension array in php.
Answer (1)
And finally with PHP 7 you can use the spaceship operator:
usort($myArray, function($a, $b) {
return $a["order"] <=> $b["order"];
});
Answer (2)
Hi, I think this is useful...
$value = array_column($result, 'recordNo');
array_multisort($value, SORT_ASC, SORT_REGULAR,$result);