bodell1989
New Member
Given this PHP code:\[code\]// total is 71.24 (float)$value = http://stackoverflow.com/questions/2055469/$total * 100;var_dump($value);$valuecast = (int)$value;var_dump($valuecast);settype($value,'int');var_dump($value);\[/code\]var_dump($value) gives float(7124)var_dump($valuecast) gives int(7123)var_dump($value) after settype gives int(7123)How can I get the correct type conversion?