How can i check to see if a string only contains spaces?
if (strlen(trim($str)) == 0)
or if you don't want to include empty strings,
if (strlen($str) > 0 && strlen(trim($str)) == 0)
2.1m questions
2.1m answers
60 comments
57.0k users