Hey guys,
I was hoping you could help me with a little problem I'm having sorting array of arrays. I have a data structure which looks like the following:
r_print($shows);
(
[Bored to death] => Array
(
[current_episode] => 1x07
[current_name] => The Case of the Stolen Sperm
[current_date] => Nov/01/2009
[current_screened] => 6.9
)
[Californication] => Array
(
[current_episode] => 3x06
[current_name] => Glass Houses
[current_date] => Nov/01/2009
[current_screened] => 6.9
)
[Cougar Town] => Array
(
[current_episode] => 1x07
[current_name] => Don't Come Around Here No More
[current_date] => Nov/04/2009
[current_screened] => 3.9
)
)
I'm wanting to write a loop which prints out the info, in a sorted order based on the 'current_screened' value, which shows how long ago the show screened. I looked at plenty of examples of sorting multidimensional & associative arrays but I cant seem to apply any of them to the data structure I have used (by the way, does it look an alright way of storing this data, or is there a better way?).
Any help would be greatly appreciated