I have the following array:
array(a, a, a, b, b, c, c, c, c, d, d);
When I loop through it and echo it, the result is:
a
a
a
b
b
c
c
c
c
d
d
How ever I want to echo it in such a way that it displays:
a
b
c
d
a
b
c
d
a
c
c
Here is the array in a grid to better explain what im trying to achieve
Current
a a a b
b c c c
c d d
What im tryin to do
a b c d
a b c d
a c c
How would I do this?
Seeing some of your answers, its clear I didnt explain it well enough :/
i should have included what the array keys should look like:
0a 1a 2a 3b
4b 5c 6c 7c
8c 9d 10d
0a 3b 6c 9d
1a 4b 7c 10d
2a 5c 8c
Heres how i need the arrays to be organised, by key
0a
1a
2a
3b
4b
5c
6c
7c
8c
9d
10d
0a
3b
6c
9d
1a
4b
7c
10d
2a
5c
8c