Is there a cleaner way to do something like this, without having to repeat $var that many times?
if($var == "A" || $var == "L" || $var == "N" ||
$var == "Q" || $var == "U" || $var == "V")
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 could do
in_array. Put the right hand side in a array.So…
This is simple for maintainability. If you have anything more complex, a
switchmight be best.