zhoppy Posted November 30, 2007 Share Posted November 30, 2007 Hey guys, I'm having trouble with float(1) converting to int(0) Quick sample code below. Anyone have any ideas? Thanks! -Zac $a = 7.1; $i = (($a-7) * 10); //var_dump($i); var_dump((int)$i); $a = 7.1: Output: int(0) Expected: int(1) $a = 7.2: Output: int(2) Expected: int(2) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.