jd2007 Posted July 27, 2007 Share Posted July 27, 2007 How can i check if a number is round or not ? 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? 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 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 ? 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 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 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 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
Archived
This topic is now archived and is closed to further replies.