madspof Posted October 3, 2007 Share Posted October 3, 2007 Is there a function that checks if there is a number or letter in a variable. thnks madspof Link to comment https://forums.phpfreaks.com/topic/71734-solved-is-there-a-function-that-checks-if-there-is-a-number-or-letter-in-a-variable/ Share on other sites More sharing options...
MmmVomit Posted October 3, 2007 Share Posted October 3, 2007 Regex to the rescue. preg_match('/[A-Za-z0-9]/', $your_variable); I'm not the best with regexes just yet, so that may not be 100% correct. Link to comment https://forums.phpfreaks.com/topic/71734-solved-is-there-a-function-that-checks-if-there-is-a-number-or-letter-in-a-variable/#findComment-361236 Share on other sites More sharing options...
darkfreaks Posted October 3, 2007 Share Posted October 3, 2007 try preg match Link to comment https://forums.phpfreaks.com/topic/71734-solved-is-there-a-function-that-checks-if-there-is-a-number-or-letter-in-a-variable/#findComment-361237 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.