[thelist] PHP Insert Print Statement

Andrew Maynes andrew at humanbehaviour.co.uk
Wed Aug 14 09:55:01 CDT 2002


This is really verc useful thank you

Andrew

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Jay Blanchard
Sent: Wednesday, August 14, 2002 03:26
To: thelist at lists.evolt.org
Subject: RE: [thelist] PHP Doubling up


[snip]
ok removed it to leave this and no joy, going to sound thick now but how do
I
php Insert a print statement to print out your key/value pairs?
[/snippish]


/* Lets get the total of products and the total cost */

function status($cart) {
	if($cart) {
		foreach ($cart as $item => $value) {

		$number += $cart[$item][qty];

		$total += ($cart[$item][qty] * $cart[$item][unit_price]);
print($number . ", " . $total . "<br>\n"); // <----- HERE!
		}

		$total = correct($total);

		$return = "Your order contains <strong>".$number." </strong>";

        $return .= "items costing a total of
<strong>&pound;".$total."</strong>";

	}
	return($return);
}



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/02




More information about the thelist mailing list