title: Even and Odd numbers sorting into Text file
body: <p>HI Everyone I need help in sorting out even and odd numbers. The numbers are entered in a form and are called to the php file ( at bottom) after which I need to display them in a text file this part for me is all good. I am having trouble separating the numbers even from odd. I know we need to use the modulus command but I don't know exactly how to place it in the loop.</p>
  
  <pre><code>    $valOne = $_GET["value1"];
      $valTwo = $_GET["value2"];
      $valThr = $_GET["value3"];
      $valFou = $_GET["value4"];
      $valFiv = $_GET["value5"];
      $valSix = $_GET["value6"];
      $valSev = $_GET["value7"];
      $valEig = $_GET["value8"];
      $valNine = $_GET["value9"];
      $valTen = $_GET["value10"];
  
      $myFile = "test.txt";
      $fh = fopen($myFile, 'w') or die("can't open file");
      $array1= array ($valOne, $valTwo, $valThr, $valFou,$valFiv,
                  $valSix,$valSev,$valEig,$valNine,$valTen);
      foreach($array1 as $key =&gt; $value){
      fwrite($fh, $value. "\t");
  
  
      }
      fclose($fh);
  </code></pre>