I have the following array:
[["1", "2", "Anna"], ["1", "2", "Jodie"], ["1", "2", "susan"]]
My question is how can I output them as shown below?
I want to get all 1
as there parent index:
(
[1] =>Array
(
[2] => 3
)
)
The number 1
means the O
index of array of arrays.
The 2
is the 1
index and 3
means how many students which 1
index is equal to two. In above array there are 3 students.
Any ideas?