Course lectures : 1 of 1

Sorting arrays and objects with PHP

Last updated: 28th January 2016

Learn how to sort arrays and collections of objects using PHP's usort() function.

php usortphp array sortingarray sorting in phpsort array with phpsort objectssorting objects with phpphp object sortingsorting objects by property


If you'd like to include code example please wrap your code within <pre><code> tags.

function fullName(firstName, lastName)
    return firstName + ' ' + lastName;