![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
08/08/2002, 15:51
|
| | Fecha de Ingreso: diciembre-2001 Ubicación: Madrid
Mensajes: 889
Antigüedad: 23 años, 1 mes Puntos: 4 | |
Re: Simple operacion matematica, AYUDA!!! En efecto, como dice josemi, se hace con number_format($variable,numero_decimales).
Ejemplo:
$variable = 2.683526;
$un_decimal = number_format($variable,1);
echo $un_decimal;
Si lo que queremos es redondearlo:
$variable = 2.683526;
$variable = round($variable);
echo $variable;
Saludos!!
<html><center><embed src="http://www.iespana.es/redmaestro/banner.swf" height=75 width=500>
</embed></center></html> |