Sort in multi dimension array in php

Hi guys i want to sort value in multi dimension array in php.
Deepak Sharma
Asked 24-01-2024
222

Answer (1)
And finally with PHP 7 you can use the spaceship operator: usort($myArray, function($a, $b) { return $a["order"] <=> $b["order"]; });
Deepak Sharma
Asked 10-11-2020
45 Likes
Comments
Write comment

Answer (2)
Hi, I think this is useful... $value = array_column($result, 'recordNo'); array_multisort($value, SORT_ASC, SORT_REGULAR,$result);
Ankur Rajput
Asked 28-09-2019
45 Likes
Comments
Write comment

Submit your answer