(
[0] => Array
(
[NAME] => Детская клиника
)
[1] => Array
(
[NAME] => Детская генетика
)
[2] => Array
(
[NAME] => Детский врач
)
usort($array, fn ($a, $b) => $a['NAME'] <=> $b['NAME']);
usort($array, function ($a, $b) {
$aWords = explode(' ', $a['NAME']);
$bWords = explode(' ', $b['NAME']);
return $aWords[1] <=> $bWords[1];
});