I have an array like so:
array(2) {
[0]=>
array(4) {
[0]=>
string(6) "04ba2c"
[1]=>
string(6) "f4a204"
[2]=>
string(6) "d40604"
[3]=>
string(6) "990000"
}
[1]=>
array(4) {
[0]=>
string(6) "666666"
[1]=>
string(6) "666666"
[2]=>
string(6) "666666"
[3]=>
string(6) "666666"
}
}
I would like to build the array so that it appears like so but I am not sure how to do this?
array(1) {
[0]=>
array(8) {
[0]=>
string(6) "04ba2c"
[1]=>
string(6) "666666"
[2]=>
string(6) "f4a204"
[3]=>
string(6) "666666"
[4]=>
string(6) "d40604"
[5]=>
string(6) "666666"
[6]=>
string(6) "990000"
[7]=>
string(6) "666666"
}
Any ideas to easily do this in PHP?
or, if the two arrays are not of equal length, you can loop until you reach the highest value and only add the found items: