Empty Arrays, safe?
<p>I'm learning how to create a shopping cart. ( From different posts/questions here on SO, I know that many will suggest that I just use a pre-fab system; however, as a newbie, I really want to learn how it works. Also, my cart will probably have more elements than the usual).</p>

<p>I'm using a for-loop to show the user-selected items in the cart session array. Ostensibly, only those selected appear on the browser; however, a var_dump, shows BLANK ARRAYS with NULL values are being created every time I refresh the page. Again, nothing is added to the echoed out cart view.</p>

<p>This may sound silly but I just want to make sure that those NULL ARRAYS will not cause any problems when the cart is passed for check out and contents are dumped to orders table in the database.</p>

<p>And what of the arrays with a product id but NO QUANTITY? Just thinking ahead if a smart*** user tries to add to cart with zero quantity.</p>

<p>Your knowledgeable opinions and experiences are much appreciated:)--KATY</p>
