Re: FW: formating variables

2001-09-18 Thread Brett W. McCoy
On Tue, 18 Sep 2001, Wagner wrote: > I have a variable $var and its value is 345.678975 (for example). > How can i format $var to became 345.67 only two digits after the > point... printf("%.2f", $var); Note that this will do actual rounding of your number as well. > Another question... my

FW: formating variables

2001-09-18 Thread Wagner
Hi: i've got a simple question: I have a variable $var and its value is 345.678975 (for example). How can i format $var to became 345.67 only two digits after the point... Another question... my script is generating a html document and i want to put the following text: US$ How can i put the