Sorting arrays
Posted: Wed Apr 16, 2008 3:10 am
hi,
I need to sort my array by values in a nested array.
Here is the structure of my array: Array ( [0] => Array ( [1] => Array ( [0] => Array ( [1] => 12 ) ) ) )
The value I want to sort by is the last value in the last array ([1]=>12)
How would I go about doing this? I've been looking at usort() but cant seem to get it to work.
I need to sort my array by values in a nested array.
Here is the structure of my array: Array ( [0] => Array ( [1] => Array ( [0] => Array ( [1] => 12 ) ) ) )
The value I want to sort by is the last value in the last array ([1]=>12)
How would I go about doing this? I've been looking at usort() but cant seem to get it to work.