{"id":12184,"date":"2022-05-11T04:00:03","date_gmt":"2022-05-11T08:00:03","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=12184"},"modified":"2022-05-11T04:00:05","modified_gmt":"2022-05-11T08:00:05","slug":"check-string-length-greater-than-zero-php","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/check-string-length-greater-than-zero-php\/","title":{"rendered":"Check if String Length is Greater Than Zero in PHP"},"content":{"rendered":"\n
Use this code snippet to check if string length is greater than zero in PHP.<\/p>\n\n\n\n
if( strlen( trim( $string )) > 0 ){\n\n \/\/ do something cool if $string has at least one non-space character\n\n}<\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,25,27,15,16],"tags":[433,449,452,471,544],"yoast_head":"\nPHP Check String Length is Greater Than 0 Example<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n