I am trying to do a regular expression that will return statement 1 (Help) if the password is less than 8 characters. Please help… I think it’s in my if statement.
$Password = “asyghkkjuhyygrrefg”;
echo $Password;
if (preg_match("/^[\w]+n(?=.{0,6}).*$/", $Password) ===1) {
echo “
Help</>”;
else
echo “
oops!
”;}
The error says I have an “unexpected else.”
Thanks!