Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/11/2003, 15:52
soud
 
Fecha de Ingreso: agosto-2003
Mensajes: 39
Antigüedad: 23 años, 2 meses
Puntos: 0
gracias por responder, ahi encontré la respuesta y aqui esta por si alguien mas con esta duda se presenta por aquí.


Código PHP:
<?
function truncate ($num, $digits = 0) {

    
//provide the real number, and the number of 
    //digits right of the decimal you want to keep.

    
$shift = pow(10 , $digits);
    return ((
floor($num * $shift)) / $shift);

} 

$divicion = 6/4;

echo 
truncate($divicion);
?>