Answers for "php array sort by specific value"

PHP
1

php sort array by specific key

usort($array, function ($a, $b) {
  return ($a['specific_key'] < $b['specific_key']) ? -1 : 1;
});
Posted by: Guest on January-22-2021

Code answers related to "php array sort by specific value"

Browse Popular Code Answers by Language