PHP Modify Array
- by Ozzy
Hi all, 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?