You can use the usort function.
function cmp($a, $b) {
return $a["mid"] - $b["mid"];
}
usort($arr, "cmp");
More Related Contents:
- In PHP, how do you change the key of an array element?
- php $_POST array empty upon form submission
- How to generate in PHP all combinations of items in multiple arrays
- What is the best way to loop through this array in PHP?
- Find a matching or closest value in an array
- What’s the best way to get the last element of an array without deleting it?
- PHP: Access Array Value on the Fly
- Search for a key in an array, recursively
- How to use a string as an array index path to retrieve a value?
- How to get common values from two different arrays in PHP [closed]
- Comment associative array in PHP Documentor
- What is the meaning of [] [closed]
- Unsetting array values in a foreach loop [duplicate]
- PHP – Find parent key of array
- Warning: array_combine(): Both parameters should have an equal number of elements
- Returning first x items from array
- Prepend associative array elements to an associative array
- What is the difference between array_udiff_assoc() and array_diff_uassoc()?
- How do I declare a two dimensional array?
- Combine two 2d arrays and have duplicate rows removed
- How to create multi-dimensional array from a list?
- how to change the array key to start from 1 instead of 0 [duplicate]
- Alternate to array_column()
- How to remove values from two arrays that have the same key and value?
- Create PHP array from MySQL column
- Recreate original PHP array from print_r output [duplicate]
- How to convert an integer to an array in PHP?
- Save array in mysql database
- How to count the consecutive duplicate values in an array?
- How do I check if array contains at least one empty value?