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 Quote Link to comment 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 Quote Link to comment 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"; } Quote Link to comment Share on other sites More sharing options...
Verbat Posted February 22, 2008 Author Share Posted February 22, 2008 Thanks guy's.... 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.