Jump to content

[SOLVED] Adding a zero on the end of output?


Josepheuan

Recommended Posts

I've got a quote calulator form (in php) on my site so customers can get a quote for the sizes they need.

 

The problem I got, is if the price is £32.60. The page outputs £32.6 

 

Is there anyway to make it add the last zero when there's meant to be one?

 

Thanks

 

Joseph

This is what I have at the moment.

I'm still learning, so no doubt the code layout is crap and wrong :\

 

 

        <?
$height=$HTTP_POST_VARS['height'];
$width=$HTTP_POST_VARS['width']; Print $width; ?>ft x
        <? 
   $height=$HTTP_POST_VARS['height'];
  $width=$HTTP_POST_VARS['width'];Print $height; ?>ft full colour banner is:<br />
       <?
  $height=$HTTP_POST_VARS['height'];
  $width=$HTTP_POST_VARS['width'];
  
$servicefee = 0;
$Inchcost = 3.60; 
$width = $width;
$height = $height;
$cost = ($Inchcost * $width * $height) + $servicefee;

Print $cost;

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.