How to kickout in a foreach loop?
<p>For example in a for loop you can kick out like this:</p>

<pre><code>for($i = 0; $i &lt; count($ary); $i++){
    if($ary[$i] == 'blah') 
        $i = count($ary);

    echo $i;
}
</code></pre>

<p>Or in a while loop:</p>

<pre><code>$i = 0;

while($i &lt; count($ary)){
    if($ary[$i++] == 'blah')
        $i = count($ary);

    echo $i;
}
</code></pre>
