Posted by Koncept on 09/12/06 00:49
In article <ee49ue0d0o@drn.newsguy.com>, Tim <tim@aol.net> wrote:
> You could use printf|sprintf and assign it to whatever variable you needed it
> for. As an example, maybe...
>
> $rounded_no = sprintf("%.2f", $fp_no);
Yep. sprintf is what you are looking for. It returns a formatted value
but does not print like printf. Tim's example will work just fine for
you.
--
Koncept <<
"The snake that cannot shed its skin perishes. So do the spirits who are
prevented from changing their opinions; they cease to be a spirit." -Nietzsche
Navigation:
[Reply to this message]
|