For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > October 2004 > Re: [PHP-INSTALL] Limiting the decimal value









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-INSTALL] Limiting the decimal value
Janet Valade

2004-10-19, 3:57 pm

Scott Hamm wrote:

> How do I limit the decimal value into 2 places?
>
>
> <?
> If ($ProdActu <> 0)
> {
> $Eff = ($ProdActu/$ProdProj)*100;
> }
> ?>
>


See number_format() in the PHP manual.

Janet


--
Janet Valade -- janet.valade.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com