title: PHP syntax help for checking multiple IDS in an array
body: <p>I am using contact form 7 in wordpress and had to create a custom hook for the form action url. I have it working if I want to check if a particular forms "id" exist, and if so to send it to another url. That code looks like this:</p>
  
  <pre><code>add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');
  
  function wpcf7_custom_form_action_url($url)
  {
      global $wpcf7_contact_form;
  
      if ($wpcf7_contact_form-&gt;id === 333)
      {
          return 'http://mydomain.com/Leads/';
      }
      else
      {
          return $url;
      }
  }
  </code></pre>
  
  <p>However, I have 4 forms that I want it to check to see if any of them exist to send the to the same url as above (where its my domain url). If I try adding multiple ids it breaks. This is what I have tried:</p>
  
  <pre><code>add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');
  
  function wpcf7_custom_form_action_url($url)
  {
      global $wpcf7_contact_form;
  
      if ($wpcf7_contact_form-&gt;id === 333 || 334 || 335 || 336)
      {
          return 'http://mydomain.com//Leads/';
      }
      else
      {
          return $url;
      }
  }
  </code></pre>
  
  <p>The code above seems to not work. </p>
  
  <p>I have also tried to check it as an array like this:</p>
  
  <pre><code>add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');
  
  function wpcf7_custom_form_action_url($url)
  {
      global $wpcf7_contact_form;
  
      if( !in_array($wpcf7_contact_form-&gt;id,array(660, 684, 685, 686)))
      {
          return 'http://mydomain.com/Leads/';
      }
      else
      {
          return $url;
      }
  }
  </code></pre>
  
  <p>Again, it appears that this is not correct. Can anyone see anything that is incorrect above. I can't seem to get it working.</p>