View Single Post
Old 07-11-2003, 11:08 AM  
cj-design
Confirmed User
 
Join Date: Apr 2003
Location: England
Posts: 378
php - why does this happen?

PHP Code:
$rrp "19.99";
$price "14.99";
$saving $rrp $price;
$adding $rrp $price;

print 
"RRP: $rrp";
print 
"<p>";
print 
"Price: $price";
print 
"<P>";
print 
"Saving $saving";
print 
"<P>";
print 
"Added Together $adding"
Output:

RRP: 19.99
Price: 14.99

Saving 5

Added Together 34.98


What happened to the decimal places on the saving?
cj-design is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote