RE: [PHP] beginner in PHP

From: Date: Thu, 13 Jun 2002 03:33:29 +0000
Subject: RE: [PHP] beginner in PHP
Groups: php.general 
Request: Send a blank email to php-general+get-101876@lists.php.net to get a copy of this message
send the results of putting these two line just before your while loop print_r($mycart); print_r($catalog); -----Original Message----- From: Phillip Perry [mailto:pperry@inter-design.net] Sent: Thursday, June 13, 2002 1:31 PM To: Tom Rogers; Php Subject: RE: [PHP] beginner in PHP Thanks, but that didn't work either -----Original Message----- From: Tom Rogers [mailto:trogers@kwikin.com] Sent: Wednesday, June 12, 2002 11:32 PM To: pperry@inter-design.net; Php Subject: Re: [PHP] beginner in PHP Hi itemcd and unitprice should be in quotes I think if they are keys in an array. $catalog["itemcd"] $catalog["unitprice"] Tom At 10:56 PM 12/06/2002 -0400, Phillip Perry wrote: >Can someone tell me why this doesn't work? >The $mycart array is fine and the $catalog array is also fine but nothing >inside the if statement prints. I've tried other echo statements but nothing >prints at all. > >while (list($key,$value) = each($mycart)) > { > if ($value == $catalog[itemcd]) > { > > echo $catalog[unitprice]; > > } > } > > >Thanks > >Phil >

« previous php.general (#101876) next »