Using continue to skip iteration in foreach from inside a swich <pre><code>$arr = array('no want to print','foo','bar'); foreach($arr as $item){ switch($item){ case 'foo': $item = 'bar'; break; case 'not want to print': continue; break; } echo $item; } </code></pre> <p><a href="http://codepad.org/Ytkd8x2M" rel="nofollow">http://codepad.org/Ytkd8x2M</a></p> <p>But 'not want to print' is printed, Why does continue don't apply to the foreach?</p>