title: Difficulty checking if elements in array are type integer PHP
body: <p><br/>I am trying to detect if one or more variables contain numbers. I have tried a few different methods, but I have not been entirely successful. <br/><br/>Here is what I have tried.</p>
  
  <pre><code>&lt;?php
  $one = '1';
  $two = '2';
  
  $a1 = '3';
  $a2 = '4';
  $a3 = '5';
  
  
  $string_detecting_array = array(); 
  
  array_push($string_detecting_array, $one,$two,$a1,$a2,$a3); 
  
  foreach ($string_detecting_array as $key) { 
      if (is_numeric($key)) {
          echo 'Yes all elements in array are type integer.';
      } 
      else {
          echo "Not all elements in array were type integer.";
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p><br/><br/>
  I haven't been successful using this method. Any ideas? Thankyou in advance!</p>