if (strlen($comment > 2)) {
Ok, so I only want to exec this if $comment consist of more than 2 characters
I believe strlen should do this, but it doesn't. Am I using it wrong?
if (strlen($comment > 2)) {
Ok, so I only want to exec this if $comment consist of more than 2 characters
I believe strlen should do this, but it doesn't. Am I using it wrong?
Your closing parenthesis is in the wrong place:
if (strlen($comment) > 2) {
}
I don't know php. But perhaps you should try
if (strlen($comment) > 2) {
Haha what a failure i am. thanks everybody im gonna mark Danras answer since he/she was first
should be:
if ( strlen($comment) > 2 ) {
You might also want to trim() the comment as well to make sure it's more than two non-whitespace characters:
if ( strlen(trim($comment)) > 2 ) {