note 86264 deleted from control-structures.foreach by danbrown
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: dezer1[*]web.de
----
if you only want a loop without a "for-loop",
try this easy way:
<?
foreach(range(0,9) as $val)
{
echo $val.' test ';
}
// Output:
//0 test 1 test 2 test 3 test 4 test 5 test 6 test 7 test 8 test 9 test
?>