Answers for "php sort 2 arrays based on value"

PHP
2

sort multi array php

$keys = array_column($array, 'Price');

		array_multisort($keys, SORT_ASC, $array);
	
		print_r($array);
Posted by: Guest on August-04-2020
0

php sort multidimensional array by value

usort($myArray, function($a, $b) {
    return $a['order'] <=> $b['order'];
});
Posted by: Guest on April-18-2021

Code answers related to "php sort 2 arrays based on value"

Browse Popular Code Answers by Language