Verbat Posted February 22, 2008 Share Posted February 22, 2008 How do i check if some VAR has only numbers in it or not? Thanks Link to comment https://forums.phpfreaks.com/topic/92441-numeric-check/ Share on other sites More sharing options...
cooldude832 Posted February 22, 2008 Share Posted February 22, 2008 numbers as in integers or float? you can try to do is_float or is_int Link to comment https://forums.phpfreaks.com/topic/92441-numeric-check/#findComment-473592 Share on other sites More sharing options...
Rohan Shenoy Posted February 22, 2008 Share Posted February 22, 2008 $string="123456"; if(is_numeric($string)) { echo "String is purely numeric"; } else { echo "String is not numeric"; } Link to comment https://forums.phpfreaks.com/topic/92441-numeric-check/#findComment-473593 Share on other sites More sharing options...
Verbat Posted February 22, 2008 Author Share Posted February 22, 2008 Thanks guy's.... Link to comment https://forums.phpfreaks.com/topic/92441-numeric-check/#findComment-473600 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.