title: Removing a value from an array php
body: <p>Is there an easier way to do so?</p>
  
  <pre><code>$array = array(1,57,5,84,21,8,4,2,8,3,4);
  $remove = 21;   
  $i = 0;
  foreach ($array as $value ){
      if( $value == $remove)
          unset($array[$i])
          $i++;
      }
  
  //array: 1,57,5,84,8,4,2,8,3,4
  </code></pre>