Re: Find values in an array question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Umm, for un-pretty version:

$quantity = $shoppingcartQuantity;
print_r($quantity);

Or, for a more clean version:

$quantity = $shoppingcartQuantity;
foreach($quantity AS $row)
	echo "$row<br>";




On Thu, 2003-05-15 at 15:02, Boa Constructor wrote:
> Hey all, I have added this in to my PHP script:
> 
> for($b=0;$b<count($shoppingcartQuantity);$b++)
> 
> {
> 
> if($quantity!=1)
> 
> {
> 
> $quantity = array_values($shoppingcartQuantity);
> 
> echo "Quantity = $quantity";
> 
> }
> 
> }
> 
> 
> 
> When this is run I get the following echoed out to the browser:  Quantity =
> Array
> 
> What I am trying to do is print out the values stored at each position in
> the array, what am I doing wrong........ or right?
> 
> 
> 
> Any ideas anyone?
> 
> 
> 
> Cheers,
> 
> Graeme :)
-- 
Adam Voigt (adam@cryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux