Created
October 15, 2019 09:12
-
-
Save VSeryoga/8d01d7c5f09948e1616c7172d1409215 to your computer and use it in GitHub Desktop.
Сортировка массива
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
protected function sort_array($key) | |
{ | |
return function($a,$b) use($key){ | |
return $a[$key] <=> $b[$key]; | |
}; | |
} | |
usort($this->arResult['BASKET'], $this->sort_array('PROVIDER')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment