Sorting a multidimensional array
Posted: Sat Mar 06, 2004 2:34 pm
I need help sorting a multidimensional arary.
Lets say I have this for example
How could I order alphabetically, the values in the ["foo"] key ?
edit: I found out how to do it using usort, so problem solved.
Lets say I have this for example
Code: Select all
<?php
$array[$i]["foo"] = "bar";
$array[$i]["bar"] = "foo";
$i++;
$array[$i]["foo"] = "foo";
$array[$i]["bar"] = "bar";
?>edit: I found out how to do it using usort, so problem solved.