Search results for 'for loop'. 1 post(s) found.
- 2007/10/16 for loop - simple
for loop - basic control structure. This example loops until the variable hits 10 and then breaks out.
<?php
for ($i = 1; ; $i++) {
if ($i > 10) {
break;
}
echo $i;
}
for ($i = 1; ; $i++) {
if ($i > 10) {
break;
}
echo $i;
}
?>
sample output :
12345678910
Another posts included in "PHP"
| How to ban / block IP addresses (0) | 2007/10/16 |
| email validation, simple (0) | 2007/10/16 |
| How to get current filename as variable ? (0) | 2007/10/16 |
| form action - detect form post (0) | 2007/10/16 |
| How to make random number ? (0) | 2007/10/16 |
| How to force cookies, disable php sessid in URL ? (0) | 2007/10/16 |
| How to check if a file exists ? (0) | 2007/10/16 |
| How to include a file with error reporting ? (0) | 2007/10/16 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 05:19
moneyideas
-
Subject different money making ideas
2010/01/29 14:04
moneyideas
-
Subject different money making ideas
2010/01/31 16:42
moneyideas

Prev

Rss Feed