Possible Duplicate:
Compare multiple values in PHP
I want to do something like this
if($abc="asdf","sdfg","dfgh") {
echo "Something";
}
What should I do? Do I have to use seperate rules with || ?
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.
You would use
in_array()for such purposes:The third parameter of
in_array()can be used to perform strict type checks between the needle and each item of the haystack, similar to===.