Re: [SMARTY] problem displaying float

Peggy Schatz <[email protected]> Fri, 17 Nov 2006 17:05:50 +0100
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
Hi George,

maybe you did not assign  $fee properly/at all...

There should be a line of code in your php-script like:

$smarty->assign('fee',$fee);

Within your template you then state {$fee} or as messju recommended 
{"%.2f"|sprintf:$fee}
The latter modifies a string to get the proper number of floating values 
(or however these are called)....

Hope that helps...

Peggy

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php