Using the break Statement : break statement « Statement « PHP
- PHP
- Statement
- break statement
Using the break Statement
<html>
<head><title>Using the break Statement</title></head>
<body>
<div>
<?php
$counter = -4;
for ( ; $counter <= 10; $counter++ ) {
if ( $counter == 0 ) {
break;
}
$temp = 4000/$counter;
print "4000 divided by $counter is.. $temp<br />";
}
?>
</div>
</body>
</html>
Related examples in the same category