jeudi 29 juin 2017

php if statement if variable is empty or has at least 5 characters

I need to check if my variable is not empty and has at least 5 characters. The $results is a mix of letters and numbers.

 if($results == !empty AND has 5 characters){
   //do a task
 } else {
   //do another task
 }

Aucun commentaire:

Enregistrer un commentaire