RE: Need unrounded precision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> Couldn't this be done with just simple math functions?
>
>indeed:
>
>$a = 28.56018;
>$b = $a * 10 % 10 >> 0;

Hmmm...   Didn't think about this, but % only works with int values, so

$b = $a * 10 % 10;

Should work as well.

Jaime


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux