MySQL Forums
Forum List  »  PHP

Arithmetic error
Posted by: terry tatenda
Date: November 02, 2012 03:00PM

hie
Im having a problem with my code. If i run this code alone my price outputs perfectly

$cartOutput.="<h2>Cart Item $i</h2>";
$cartOutput.="Item ID: " . $each_item['item_id']."<br/>";
$cartOutput.="Item Quantity: " . $each_item['quantity']."<br/>";
$cartOutput.="Item Name: " . $product_name."<br/>";
---> $cartOutput.="Item Price: " . $price."<br/>";


But when i add this to the code at the top to give a total of the price, the price output comes out blank. Please help

$price=$price*$each_item['item_id'];

Options: ReplyQuote


Subject
Written By
Posted
Arithmetic error
November 02, 2012 03:00PM
November 03, 2012 03:07AM
November 03, 2012 04:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.