Mega Code Archive

 
Categories / Php / Strings
 

Calculating the length of a string

<?php $password="password"; if (strlen($password) <= 5){     echo("Passwords must be at least 5 characters long."); } else {     echo ("Password accepted."); } ?>