note 86264 deleted from control-structures.foreach by danbrown

[email protected]
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

?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.