Return to Snippet

Revision: 52666
at October 29, 2011 00:34 by Rain


Initial Code
uasort($objects, function($a, $b) { return strcmp($a->property, $b->property); } );

Initial URL

                                

Initial Description
Used to sort array of objects by it's property

Note: Anonymous functions are available since PHP 5.3.0.

Initial Title
Sort array of objects by object\'s property

Initial Tags
php, sort, object, array

Initial Language
PHP