title: Get Highest number from array using for loop
body: <p>I am trying to get highest number from <code>array</code>. But not getting it. I have to get highest number from the array using <code>for</code> loop.</p>
  
  <pre><code>&lt;?php
  $a =array(1, 44, 5, 6, 68, 9);
  $res=$a[0];
  for($i=0; $i&lt;=count($a); $i++){
      if($res&gt;$a[$i]){
          $res=$a[$i];
      }
  }
  ?&gt;
  </code></pre>
  
  <p>I have to use <code>for</code> loop as i explained above. Wat is wrong with it?</p>