RE: [PHP] More on removing item from cart

From: Date: Thu, 27 Jun 2002 09:21:16 +0000
Subject: RE: [PHP] More on removing item from cart
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104122@lists.php.net to get a copy of this message
Anytime I use arrays I use what John suggested but add <pre></pre> around it. If you do that then the array becomes very clear. echo "<pre>", print_r($_SESSION), "</pre>"; -----Original Message----- From: Jason Wong [mailto:php-general@gremlins.com.hk] Sent: June 27, 2002 12:44 AM To: php-general@lists.php.net Subject: Re: [PHP] More on removing item from cart On Thursday 27 June 2002 10:52, Analysis & Solutions wrote: > Hey Vicki: > > On Wed, Jun 26, 2002 at 11:01:31AM -0400, Vicki wrote: > > I'm checking the cart structure by printing the following code inserted > > right after the "if($save);" > > line (is this the best way to check on the contents of an array?) > > > > while (list($key,$value) = each($cart)) > > { > > print "Cart = $key: $value<BR>"; > > } > > > > This returns "article ID number (an integer) : 1" when new > > and "article ID : yes" after the save button has been clicked. The easiest way to print out any variable is to use print_r() or var_dump(). -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* You will forget that you ever knew me. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#104122) next »