Re: Find values in an array question
| From: | Adam Voigt | Date: | Thu, 15 May 2003 19:06:15 +0000 |
| Subject: | Re: Find values in an array question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27785@lists.php.net to get a copy of this message | ||
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