adding file for working through looping control structures

cat-town
Dan Buch 14 years ago
parent ea522b13e7
commit b39eaef485

@ -0,0 +1,34 @@
<pre>
<?php
$c = 0;
while ($c < 5) {
print $c++ . "\n";
}
?>
</pre>
<pre>
<?php
$myname = "Fred";
$i = 0;
while ($myname != "Rumpelstiltskin") {
print $i++ . ": ";
if ($myname == "Fred") {
$myname = "Leslie";
} else {
$myname = "Rumpelstiltskin";
}
print "$myname\n";
}
print "How did you know?\n";
?>
</pre>
Loading…
Cancel
Save