Re: [SMARTY] problem displaying float
[email protected] (Mark Rogers) Fri, 17 Nov 2006 12:49:47 +0000
| Newsgroups | php.smarty.general |
|---|---|
| Organization | Quarella Ltd |
| Message-ID | <[email protected]> |
George Pitcher wrote: > 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); > I'd be more interested to know what gettype shows before the settype, and also for gettype($fee2). > [...] > and > > 160.44 > 160 > NULL > > when echo'd on a page using a Smarty template. > What does your Smarty template look like? Where are you doing the "maths" (the +0 bit) - within the template? I'm really not clear what you're assigning to the template, or how you're showing it. -- Mark Rogers More Solutions Ltd :: 0845 45 89 555