php tutorials
Monday, October 24, 2011
php control structures
some php control structures
====================
while
------
$i=0;
while ($i<=3) {
echo $i . "
";
$i++;
}
for
----
for ($i=1;$i<=3;$i++) {
echo $i . "
";
}
if
--
for ($i=1;$i<=3;$i++) {
if ($i==2) {
echo "One loop left
";
}
echo $i . "
";
}
No comments:
Post a Comment
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment