this relates to my previous post. how to create a collection of multi dimensional arrays and not overwrite origional values when new ones are pushed
i am thinking my problem has to do with how i am creating the array. what i'm trying to do is make an array that looks like this
Array
(
[10] => Array
(
[0] => 29
[1] => 36
)
)
into something like this
Array
(
[10] => Array
(
[0] => 29
[1] => 36
)
[20] => Array
(
[0] => 29
[1] => 36
)
[25] => Array
(
[0] => 29
[1] => 36
)
)
the 10, 20, and 25 is the product id where the numbers within those are the selections that were selected on that page (in the link i gave above). so each product would have its own collection selected.
when i use array_push instead of doing what i want it to do the first collection of array as in the first example keep reseting. so if i do my selections on say flyers and add to cart then i go to business cards and do my selections and add to cart the array resets and it becomes like the first example. whatever i try i cant get it to merge below a collection like the second example that i have. i have tried array_merge(),array_push but those dont really work.