For statement without second condition : for loop « Statement « PHP
- PHP
- Statement
- for loop
For statement without second condition
<?php
// Example Two
for ($kilometers = 1; ; $kilometers++) {
if ($kilometers > 5) break;
echo "$kilometers kilometers = ".$kilometers*0.62140. " miles. <br />";
}
?>
Related examples in the same category