PHP funkce usort()
06. 07. 2020Dostupnost ve verzích: PHP 4.0
Sort an array by values using a user-defined comparison function
Parametry
Parametr | Datový typ | Výchozí hodnota | Poznámka |
---|---|---|---|
$array | array | The input array. | |
$cmp_function | callback | The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. |
Návratové hodnoty
bool
true on success or false on failure.
Další zdroje
https://php.net/manual/en/function.usort.php
Jan Barášek Více o autorovi
Autor článku podniká jako fullstack senior developer v Praze. Spravuje 300 různě velkých webových projektů, fungujících dodnes. Během spolupráce nabral hluboké zkušenosti, které na tomto webu předává dál.
Rád vám pomůžu:
Kontakt Konzultace a služby Nabídka spolupráce