title: Break while loop inside for loop
body: <p>How can I break while loop and for loop too when while loop is true?</p>
  
  <pre><code>&lt;?php
  for($i=0; $i&lt;4; $i++){
      $result = mysql_query("SELECT * FROM table WHERE weight='$i'");
      while($row = mysql_fetch_array($result)){
          echo $row['cell'];
          break; //I need to break the while loop and the for loop too in this line exactly, when he find and echo the "cell"!
      }
  }
  ?&gt;
  </code></pre>