jd2007 Posted July 27, 2007 Share Posted July 27, 2007 How can i check if a number is round or not ? Quote Link to comment https://forums.phpfreaks.com/topic/62027-how-can-i-check-if-a-number-is-round-or-not/ Share on other sites More sharing options...
Foser Posted July 27, 2007 Share Posted July 27, 2007 What do you mean? To check if its a decimal or a normal number? Quote Link to comment https://forums.phpfreaks.com/topic/62027-how-can-i-check-if-a-number-is-round-or-not/#findComment-308801 Share on other sites More sharing options...
jd2007 Posted July 27, 2007 Author Share Posted July 27, 2007 yes Quote Link to comment https://forums.phpfreaks.com/topic/62027-how-can-i-check-if-a-number-is-round-or-not/#findComment-308802 Share on other sites More sharing options...
jd2007 Posted July 27, 2007 Author Share Posted July 27, 2007 How can i check if a number is decimal or normal ? Quote Link to comment https://forums.phpfreaks.com/topic/62027-how-can-i-check-if-a-number-is-round-or-not/#findComment-308813 Share on other sites More sharing options...
ignace Posted July 27, 2007 Share Posted July 27, 2007 if (is_integer($decimal_or_integer)) { // integer (normal) } else { // decimal (not normal ) } usefull links: http://www.php.net/manual/en/function.is-float.php http://www.php.net/manual/en/function.is-integer.php Quote Link to comment https://forums.phpfreaks.com/topic/62027-how-can-i-check-if-a-number-is-round-or-not/#findComment-308817 Share on other sites More sharing options...
jd2007 Posted July 27, 2007 Author Share Posted July 27, 2007 thank you so much Quote Link to comment https://forums.phpfreaks.com/topic/62027-how-can-i-check-if-a-number-is-round-or-not/#findComment-308822 Share on other sites More sharing options...
ignace Posted July 27, 2007 Share Posted July 27, 2007 no thx, we are only here to do just this Quote Link to comment https://forums.phpfreaks.com/topic/62027-how-can-i-check-if-a-number-is-round-or-not/#findComment-308829 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.