dreamci Posted July 18, 2008 Share Posted July 18, 2008 hi i want to ask how to check if there is a letter in the submitted data i want the data to contain only numbers nothing more and also opposite of this i mean checking if there is a number in the submitted data can u tell me the code please thanks Quote Link to comment https://forums.phpfreaks.com/topic/115523-solved-easy-string-checking-question/ Share on other sites More sharing options...
Stephen Posted July 18, 2008 Share Posted July 18, 2008 Try using the function is_numeric("the string"); If it's not a string try using: is_int(number); Quote Link to comment https://forums.phpfreaks.com/topic/115523-solved-easy-string-checking-question/#findComment-593879 Share on other sites More sharing options...
DeanWhitehouse Posted July 18, 2008 Share Posted July 18, 2008 is_numeric(); is the function to check if the string is numeric, and search the php manual string functions to find one to check for the number in the string. Quote Link to comment https://forums.phpfreaks.com/topic/115523-solved-easy-string-checking-question/#findComment-593880 Share on other sites More sharing options...
dreamci Posted July 18, 2008 Author Share Posted July 18, 2008 thank you guys Quote Link to comment https://forums.phpfreaks.com/topic/115523-solved-easy-string-checking-question/#findComment-593882 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.