Use usort
which is built explicitly for this purpose.
function cmp($a, $b)
{
return strcmp($a["title"], $b["title"]);
}
usort($array, "cmp");
More Related Contents:
- How to get popular keywords in an array
- How can I sort arrays and data in PHP?
- How to Sort a Multi-dimensional Array by Value
- How to sort an array of associative arrays by value of a given key in PHP?
- Sort array of objects by object fields
- Sort multidimensional array by multiple columns
- PHP Sort a multidimensional array by element containing Y-m-d H:i:s date
- PHP Sort Array By SubArray Value
- Sorting a php array of arrays by custom order
- How do I sort a multidimensional array by one of the fields of the inner array in PHP? [duplicate]
- Sort array of objects by one property
- PHP array multiple sort – by value then by key?
- How to sort a multidimensional array by a certain key?
- How to sort a date array in PHP
- How to sort an array of UTF-8 strings?
- How to sort date array in php?
- How to sort an array of arrays in php?
- Sort Object in PHP
- Sort multidimensional array by date column, then use other column values if dates are the same
- Sort a flat, associative array by numeric values, then by non-numeric keys
- Group rows in an associative array of associative arrays by column value and preserve the original first level keys
- Recursively sort keys of a multidimensional array
- Sort an array of associative arrays by column value
- Custom key-sort a flat associative based on another array
- Sort array by value alphabetically php
- How to have a stable sort in PHP with arsort()?
- how to sort a multidemensional array by an inner key
- How do I move an array element with a known key to the end of an array in PHP?
- Sort array by numeric keys
- Sort a multidimensional array descending by subarray count and preserve first level keys