Rounding madness

    Date: 12/05/05 (PHP Community)    Keywords: no keywords

    Is there a function that will just shave off a float value w/o rounding it? E.g. I want "3.165" presented as "3.16". Everyting I try.. number_format(), sprintf(), round() all round the thing up. I am trying to avoid treating the number as a string, so substr and split ideas are sort of out.

    Thanks.

    Source: http://www.livejournal.com/community/php/374527.html

« Random string generation || PHP form problem »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home