How to check if variable contents are a string or integer

Hi, say I have a variable called $input. How can I check the contents of the variable to see whether it is a string or a number? And then return to it with true or false? Thanks.

And another question, how do I stop people from inputting number characters into a text box and
limit them to letter chars only? Thanks again.

is the variable going to be hard coded or a typed in variable

Use preg_match(), the use numbers or letters in the pattern

Sponsor our Newsletter | Privacy Policy | Terms of Service