Проверка длина строки больше 0 PHP
if(strlen(trim($string)) > 0){
// $string has at least one non-space character
}
Blue-eyed Booby
if(strlen(trim($string)) > 0){
// $string has at least one non-space character
}