Skip to content

Instantly share code, notes, and snippets.

View evgv's full-sized avatar
🏠
Working from home

Eugene Zubkov evgv

🏠
Working from home
View GitHub Profile
@evgv
evgv / php_sort_associated_array_by_value.md
Last active October 12, 2018 11:53
PHP. Sort associated array by value use anonymous function.

Sort associated array by value use anonymous function, sort by order field

  usort($data, function($a, $b) {return $a['order'] - $b['order'];});