How to build array of 'bad' values
- by JM4
I am processing a form and in turn, receiving a response code based on the information submitted. I have a list of approximately 40 response codes (and their meaning) in my hands and am trying to build an 'if' statement that checks against a predefined array and returns a specific value.
Just not sure how to do this
First pass conceptually:
$bads = array (1,2,3,4,5,6)
if ($output['responsecode'] == (any value in $bads) {
echo "you suck";
}