I have an array which looks like the following:
Array (
[class_name] => Array ( [0] => 1 [1] => 2 )
[zone1_price] => Array ( [0] => 1 [1] => 2 )
[zone2_price] => Array ( [0] => 1 [1] => 2 )
[zone3_price] => Array ( [0] => 1 [1] => 2 )
[zone4_price] => Array ( [0] => 1 [1] => 2 )
)
I want to be able to add new rows which will be:
Array (
[class_name] => Array ( [0] => 3 )
[zone1_price] => Array ( [0] => 3 )
[zone2_price] => Array ( [0] => 3 )
[zone3_price] => Array ( [0] => 3 )
[zone4_price] => Array ( [0] => 3 )
)
which would then become:
Array (
[class_name] => Array ( [0] => 1 [1] => 2 [2] => 3 )
[zone1_price] => Array ( [0] => 1 [1] => 2 [2] => 3 )
[zone2_price] => Array ( [0] => 1 [1] => 2 [2] => 3 )
[zone3_price] => Array ( [0] => 1 [1] => 2 [2] => 3 )
[zone4_price] => Array ( [0] => 1 [1] => 2 [2] => 3 )
)
I am thinking I will need to use array_merge but I also think I need to separate the arrays, give them a key of some sort then combine them and add then array them.
Where would I start with something like this?