JSHINER Posted July 16, 2007 Share Posted July 16, 2007 How can I set something so it will recognize something as a # - so: if($var!=#) { echo 'You must enter a number'; } Link to comment https://forums.phpfreaks.com/topic/60293-solved-quick-question-about-s/ Share on other sites More sharing options...
paul2463 Posted July 16, 2007 Share Posted July 16, 2007 are you checking for that exact character '#' ??? Link to comment https://forums.phpfreaks.com/topic/60293-solved-quick-question-about-s/#findComment-299924 Share on other sites More sharing options...
pedrobcabral Posted July 16, 2007 Share Posted July 16, 2007 If the case is you want only numbers, use is_numeric() Link to comment https://forums.phpfreaks.com/topic/60293-solved-quick-question-about-s/#findComment-299925 Share on other sites More sharing options...
JSHINER Posted July 16, 2007 Author Share Posted July 16, 2007 Yes only numbers - sorry - should have been a little clearer That worked perfect - thanks! Link to comment https://forums.phpfreaks.com/topic/60293-solved-quick-question-about-s/#findComment-299930 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.