title: break; vs continue; vs return;
body: <p>I downloaded a free newsletter written in php from <a href="http://hotscripts.com">hotscripts.com</a></p>
  
  <p>I updated a little the code to add new functionality and I saw something I don't understand.</p>
  
  <p>In the code I see:</p>
  
  <pre><code>foreach() { ...
   if() ...
    break;
   elseif() ...
    continue;
  }
  </code></pre>
  
  <p>I also saw:</p>
  
  <pre><code>function() {
  // ...
  for($nl = 0; ...
   if() ...
    return true;
  }
  </code></pre>
  
  <p>I read that <code>break;</code> will stop the loop, <code>continue</code> will skip the loop to the next iteration and <code>return</code> will exit the function.</p>
  
  <p>What I don't understand is why coding that style? Why not use something like:</p>
  
  <pre><code>function() {
  // ...
   for($nl = 0; ...
    if() ...
     $returnValue = true;
    else {
     $returnValue = false;
    }
   }
   return $returnValue;
  }
  </code></pre>
  
  <p>or same idea in the for loops?</p>