Updated Tuesday, June 10, 2008
This page is a demo of the is_string() function. It works for all inputs, in all browsers. Tested in FireFox 2.0 and Internet Explorer 7. Compatible in IE5 and IE6.
| Value | is_string() |
|---|---|
| "cat" | |
| "another string" | |
| 'blah blah' | |
| 5 | |
| false | |
| 4.567 |
Use this function to validate form input. If you put a number in the text box, it will say it is not a string. If you tried to do this using the regular is_string() function, it wouldn't work.
Input text: