Re: Ayuda para reducir variable
| From: | NKStudios | Date: | Wed, 11 Jul 2001 23:22:30 +0000 |
| Subject: | Re: Ayuda para reducir variable | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-12204@lists.php.net to get a copy of this message | ||
Holas!
tan simple como mirar en el manual...
(PHP 3, PHP 4 )
round -- Rounds a float
Description
double round (double val [, int precision])
Returns the rounded value of val to specified precision (number of digits after the decimal point).
$foo = round (3.4); // $foo == 3.0$foo = round (3.5); // $foo == 4.0$foo = round (3.6); // $foo == 4.0$foo = round (1.95583, 2); // $foo == 1.96
Note: The precision parameter is only available in PHP 4.
See also ceil() and floor().
At 04:50 p.m. 10/07/2001 -0600, you wrote:
Hola listas, aqui Josue Aranda con otra pregunta... Resulta que tengo una variable asi: $variable = 10.999999999999999999999999999991 y quiero transformala a esto: $variable = 10.9 Alguien sabe como hacerlo? Ok, gracias por su atencion lista! Josué Aranda >>>Pablo Rosciani NKStudios Santa Fe Argentina ICQ: 47334870 NKStudios: [+54] (0342) 4553972 - 4530322 Movil: [+54] (0342) 156-981207 www.nkstudios.net www.nkhosting.com www.nkplanet.com www.nkhost.com