I have array in my PHP, for example:
Array
(
[0] => Array
(
[0] => Data 1 table 1
[1] =>
[2] => Data 3 table 1
[3] =>
[4] =>
[5] => Data 6 table 1
[6] =>
[7] => Data 8 table 1
[8] =>
[9] => Data 10 table 1
)
)
and I need to fill the empty element with new value from an array or $variable
. Maybe for example, I get the data from another array:
Array
(
[0] => Array
(
[0] => Data 1 table 2
[1] => Data 2 table 2
[2] => Data 3 table 2
[3] => Data 4 table 2
[4] => Data 5 table 2
)
)
so I can have a result
Array
(
[0] => Array
(
[0] => Data 1 table 1
[1] => Data 1 table 2
[2] => Data 3 table 1
[3] => Data 2 table 2
[4] => Data 3 table 2
[5] => Data 6 table 1
[6] => Data 4 table 2
[7] => Data 8 table 1
[8] => Data 5 table 2
[9] => Data 10 table 1
)
)
Any help would be appreciated. Thanks