problem displaying float
| From: | George Pitcher | Date: | Fri, 17 Nov 2006 11:52:23 +0000 |
| Subject: | problem displaying float | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-13566@lists.php.net to get a copy of this message | ||
Hi,
I'm having a problem - only on Smarty pages.
The following code:
$fee = 160.44;
$fee2 = $fee + 0; // I have a reason for adding zero;
echo $fee."<br>";
echo $fee2."<br>";
settype($fee, "float");
echo gettype($fee);
gives me
160.44
160.44
float
on a non-Smarty page
and
160.44
160
NULL
when echo'd on a page using a Smarty template.
I've tried using sprintf() with no success.
Does anyone have any idea why this is happening?
George in Oxford