Answers for "asort by specific key php"

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 "asort by specific key php"

Browse Popular Code Answers by Language