Как проверить, содержит ли строка PHP пробел? Я хочу проверить, есть ли там пробел, а затем отсылать сообщение об ошибке, если true
if(strlen($username) == whitespace ){
echo "<center>Your username must not contain any whitespace</center>";