how to create a multi dimensional array out of dynamically created fields and variables
<p>here is my url: <a href="http://iadprint.com/products?product=business%20card" rel="nofollow">http://iadprint.com/products?product=business%20card</a></p>

<p>the fields that you see on this page are all dynamically created on the backend. i decided to use the fieldnames created as variables to display the price as you can see in the js below. I have two problems one being that when the page refreshes the pricing div values cleans out and the selections do not stay and the second one is i cant figure out how to add all items selected into an array for the cart page.</p>

<p>for the first problem i figured it was best to place each selection into a cookie in an array form and on refresh pull out the data and select the needed fields. unless there is another way.</p>

<p>this is what im guessing the array would look like</p>

<pre><code>$products = array("product" =&gt; "business_card", array("ProdID" =&gt; "1"), ("ProdID" =&gt; "2") ..and so on)
</code></pre>

<p>basically i would add only the fields who have a length of greater than zero so that i know it was selected. what my question is would that be the correct way to format the array? and is there a way i can do array_push in javascript to push in new elements each time a selection change is occurred?</p>

<p>as for problem two im hopefully guessing it will be easy once the cookie is created with its correct data.</p>
