Hi,
If you look within cart.php there is already a function there that does this kind of thing.
I guess you are looking to do an add multiple products to cart or something.
If you are it is easier to add all the products/amounts to the array that you are referring to then loop through the cart.php for each element of the array - this will sort the add multiple products side for you plus look at the product options elements aswell.
__________________
ex x-cart guru
|