How can a PHP script check if a value is in an array?
I want it to check if a password input is equal to those in an array.
e.g. if $input == “pass1” or “pass2” or “pass3”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The PHP function for checking if a variable is in an array is
in_array.Like this: