Grouping an Array
Posted: Wed Oct 20, 2004 1:01 pm
I have an array
I would like to group all of the letters together (element 1 in each array) and then sort them so that the output will be:
Anyone have an idea on the best way to do this group and sort kind of array manipulation?
Code: Select all
ї0] => 1
ї1] => B
ї2] => NameOne
ї0] => 2
ї1] => C
ї2] => NameTwo
ї0] => 2
ї1] => A
ї2] => NameThree
ї0] => 2
ї1] => B
ї2] => NameFourCode: Select all
ї0] => 2
ї1] => A
ї2] => NameThree
ї0] => 1
ї1] => B
ї2] => NameOne
ї0] => 2
ї1] => B
ї2] => NameFour
ї0] => 2
ї1] => C
ї2] => NameTwo