Assumning that your original array was in a variable called $x, you can create a new array called $y like this:
$y=array();
foreach ($x as $temp) { $y[] = $temp[0][0]; }
This code will work fine for the sample array you gave. However, it's not a magic bullet that will somehow "simplify" all future complex arrays you ever have. The trick is to understand how your original array is organized and determine what you want to extract from it.
For example, when I looked at your original array, I noticed that it was really just:
$x[0][0][0] = "blue";
$x[1][0][0] = "red";
And I assume that your data will hold that structure indefinitely like this for example:
$x[2][0][0] = "black";
$x[3][0][0] = "purple";
$x[4][0][0] = "orange";
$x[5][0][0] = "indigo";
... but you know what happens when you assume.
For example, for all I know, this array might be storing the color of people's cars... and someone might have a two-tone gray/tan car, which might be stored in your array like this:
$x[6][0][0] = "gray";
$x[6][0][1] = "tan";
And when my little code snippet says that $temp is $x[6], the only part of the array that gets transferred into the $y array is the [0][0] part... which is effectively like saying:
Add $x[6][0][0] to the $y array but don't even look at $x[6][0][1].
You could make a sort of function that finds every "node" and adds it to the $y array... but then you would have a meaningless string of words. For example, let's assume that the array is structured like this:
$x [ customer # ] [ attribute ] [ sequence ]
So if we assume that "0" is the attribute for the car's color and "1" is the attribute for the car's mileage, and "2" is the attribute code for the states where the car has visited, then you might have some data like this:
Array
(
[0] => Array
(
[0] => Array
(
[0] => blue
[1] => red
)
[1] => Array
(
[0] => 122743
)
[2] => Array
(
[0] => New York
[1] => Ohio
[2] => Maine
)
)
[1] => Array
(
[0] => Array
(
[0] => green
)
[1] => Array
(
[0] => 123456
)
[2] => Array
(
[0] => Texas
[1] => Florida
)
)
)
and if you have a function that "flattens" the array by collecting all the nodes into a simple array like this:
Array
(
[0] => blue
[1] => red
[2] => 122743
[3] => New York
[4] => Ohio
[5] => Maine
[6] => green
[7] => 123456
[8] => Texas
[9] => Florida
)
... then you have a meaningless list of values. What have you gained? The construct of the array adds meaning to the data and you're stripping that away. For example, if you "flattened" the array and then $y[23] was equal to "yes", how would you know what that meant? Yes, it has air conditioning or Yes, it has insurance?