01-28-2008, 06:21 PM
|
#2 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
When converting from a float to an int, PHP just strips the decimal point and everything after it. For example:
PHP Code:
<?php
echo (int) 4856756.55;
// echo's 4856756
Take a look at my article on Variables for more info: TalkPHP - Variables for Beginners
For more precise numbers, you'll need to use the BCMath extension in PHP: PHP: BC math - Manual
Alan
|
|
|