title: how to get the next 10 elements in an array in PHP?
body: <p>I am new to php. While I was doing a project I got stuck in a  place. Consider that I have an array with 100 elements.</p>
  
  <pre><code>for ( $i=0;$i&lt;100;$i++) {
      $related = array();
      for($j=0;$j&lt;100;$j++){
          if($g[$i] != $gs[$j])
              $related[] = $gs[$j];
      }
  </code></pre>
  
  <p>What I want is to get the next 10 elements. How can I get it?</p>