How do I check to see if my string contains spaces using preg_match?

DanicaJackson

New Member
i use this code in php to detect if the string contains characters other than a-z,A-Z,0-9. I want to check if the string contains any spaces. What should I add to the pattern?\[code\]if (preg_match ('/[^a-zA-Z0-9]/i', $getmail)) { // The string contains characters other than a-z and A-Z and 0-9}\[/code\]
 
Back
Top