Hi Everybody,
I have an array of arrays of size n in the following format:
people_array[0]["name"]["age"]["dob"]
people_array[1]["name"]["age"]["dob"]
people_array[2]["name"]["age"]["dob"]
....
people_array[n-1]["name"]["age"]["dob"]
So, if there are n people, there are n rows in the main array, each row being an array itself of 3 elements (name,age,dob).
Now, I need to know how to sort this array, as it is currently set up, by "name" or "age" or "dob".
The examples I've seen of array_multisort seem to only work when the array is set up much differently than mine.
Any help would be greatly appreciated!
-Adam
I have an array of arrays of size n in the following format:
people_array[0]["name"]["age"]["dob"]
people_array[1]["name"]["age"]["dob"]
people_array[2]["name"]["age"]["dob"]
....
people_array[n-1]["name"]["age"]["dob"]
So, if there are n people, there are n rows in the main array, each row being an array itself of 3 elements (name,age,dob).
Now, I need to know how to sort this array, as it is currently set up, by "name" or "age" or "dob".
The examples I've seen of array_multisort seem to only work when the array is set up much differently than mine.
Any help would be greatly appreciated!
-Adam