how to break a while loop php code example Example: while loop php <?php $a = 0; while($a<=5){ echo $a."<br>"; $a++; } ?>