Skip navigation links

MySQL Forums :: PHP :: Arithmetic error


Advanced Search

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 terry tatenda 11/02/2012 03:00PM
Re: Arithmetic error laptop alias 11/03/2012 03:07AM
Re: Arithmetic error Barry Galbraith 11/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.