Re: live records

From: Date: Sun, 27 Mar 2005 06:05:45 +0000
Subject: Re: live records
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211660@lists.php.net to get a copy of this message
Ryan A wrote:
Hey all, Been working on this nearly the whole night so i dont really know if this is all that hard or am just braindead.
Probably just need a pair of fresh eyes. [ trimmed ]
sometimes items get deleted or are taken off the "active" list, when this happens I would like to take out these times from $cart_arr....how do i do that? eg: user has these items in his cart ($cart_arr): 1 2 3 4 Item number 3 has been taken taken off the active list, so $cart_arr should now contain only 1 2 4
You can simply unset() the key that holds that value. So, for item three, you would say unset($cart_arr[2]); This will leave you with a gap in the array : 1 2 4 Your array still has 4 entries, but one of them is empty. You can modify your query loop to check for this. Hope this helps.

« previous php.general (#211660) next »