that's funny. i replied to this thread hours ago, never got posted!
for array_multisort you would need to restructure your array. if you were going to this effort then it would be better (with your current structure) to create a new array of ages and unique ids (use the ids as the key), sort the new array the iterate over it to recompile the original array.
by far the best way is to do the array sorting implicitly in the sql query from which you retrieve the data (use and ORDER BY clause). then as you iterate over the recordset the data will be presorted.
thedaver, thanks for the documentation. I had looked at the documentation before but it was little fuzzy on how to restructure the data.
jpadie, I love your suggestion but I am accessing multiple tables and also i am rearranging the data as they come in. The table i gave was just an example. Thanks for your tip.
I will try it again with the documentation
thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.