How can I check if a PHP string contains any white space? I want to check if white space is in there, and then echo back an error message if true
if(strlen($username) == whitespace ){
echo "<center>Your username must not contain any whitespace</center>";
1 Answer