I have such array, where each key value contains meta information of picture divided by comma.
For the meta information A,B,C, A represents the ID of the picture, B the order of picture and C the color.
Array ( [0] => 657,1,1
[1] => 658,2,1
[2] => 659,3,1
[3] => 660,4,1
[4] => 661,5,1
[5] => 662,6,1
[6] => 663,7,1
[7] => 875,15,3
[8] => 877,17,3
[9] => 874,14,3
[10] => 869,9,2
[11] => 872,12,2
[12] => 959,13,2 )
I want to get a list of unique colors from all of array value. In such example it would be
echo element[0]; result = 1
echo element[1]; result = 2
echo element[2]; result = 3 <- edited
and so on, if there is more than 3 colors in array.
Can you please help me on that? These array things are really hard for me.
$before the variables.element[3], notelement[2]?