php - usort or array_multisort?
- by Simpson88Keys
Trying to sort the array below by memnum in ascending order, and I'm a bit confused which is better to use... usort or array_multisort? I was thinking usort because it's multidimensional? Does anyone have an example of this?
Array
(
[0] => Array
(
[memnum] => 3236467423
[mid] => 1104881300
[fname] => JOHN
[lname] => DOE
[add1] => OMITTED
[add2] =>
[city] => CHESTERFIELD
[state] => MI
[zip] => 48051
[age] => 50
)
[1] => Array
(
[memnum] => 3258467922
[mid] => 1105121457
[fname] => JANE
[lname] => DOE
[add1] => OMITTED
[add2] =>
[city] => CHESTERFIELD
[state] => MI
[zip] => 48051
[age] => 50
)
[2] => Array
(
[memnum] => 3237769108
[mid] => 1104489312
[fname] => BOB
[lname] => DOE
[add1] => OMITTED
[add2] =>
[city] => CHESTERFIELD
[state] => MI
[zip] => 48051
[age] => 50
)
)