I have a $name
variable containing a string, and when I test it, I never get the "Name should be between 2 and 40 characters" error even when it's less than 2 characters long or more than 40. Why?
if (strlen($name) < 2 && strlen($name) > 40) {
$nameError = 'Name should be between 2 and 40 characters';
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…