looping and incrementing

From: Date: Wed, 05 Dec 2001 10:06:00 +0000
Subject: looping and incrementing
Groups: php.general 
Request: Send a blank email to php-general+get-76683@lists.php.net to get a copy of this message
I guess I didn't state my question very well in my previous post "question on incrementing." This is the situation. I'm building a shopping cart... Right now I'm passing a variable "$itemnumber" from the catalog page to the cart page. $itemnumber is an array and every time a product is added to the cart, the itemnumber is tacked on to this array. I'm then making a loop for the array, referencing each unique value in $itemnumber to an item number in a MySQL database. Then I call the information from the table in MySQL where $itemnumber == $query[itemnumber]. I hope you understand all of that.... anyway, this is what I'm looking to do. I need a way to increment a variable $quantity. If that means reloading that's ok...but I just can't seem to come up with a way to add to a quantity without effecting my quantity values for all of the other item numbers in the array. any help would be majorly appreciate. -Jordan

« previous php.general (#76683) next »