Devon11 Posted January 17, 2009 Share Posted January 17, 2009 how can i divide something and then take the integer part i see i can't use mod or div here in php :-\ Link to comment https://forums.phpfreaks.com/topic/141197-division/ Share on other sites More sharing options...
Mchl Posted January 17, 2009 Share Posted January 17, 2009 $a = (int)(10/3); echo $a; Link to comment https://forums.phpfreaks.com/topic/141197-division/#findComment-739012 Share on other sites More sharing options...
Devon11 Posted January 17, 2009 Author Share Posted January 17, 2009 thanks Link to comment https://forums.phpfreaks.com/topic/141197-division/#findComment-739016 Share on other sites More sharing options...
Mchl Posted January 17, 2009 Share Posted January 17, 2009 You're welcome Also take a look here http://www.php.net/manual/en/language.operators.arithmetic.php Link to comment https://forums.phpfreaks.com/topic/141197-division/#findComment-739019 Share on other sites More sharing options...
Mark Baker Posted January 17, 2009 Share Posted January 17, 2009 i see i can't use mod or div here in php :-\ To use mod: $modValue = 3 % 2; Link to comment https://forums.phpfreaks.com/topic/141197-division/#findComment-739035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.