note 68786 added to control-structures.for
| From: | frank at booksku dot com | Date: | Thu, 10 Aug 2006 18:15:02 +0000 |
| Subject: | note 68786 added to control-structures.for | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115768@lists.php.net to get a copy of this message | ||
re: jdtoth:
I'm fairly sure the following gives you exactly the output you're looking for:
$arr = array(12,18,24,36);
foreach($arr as $num)
foreach($arr as $inner_num)
foreach($arr as $last_num)
echo "$num-$inner_num-$last_num\n";
----
Server IP: 83.138.144.80
Probable Submitter: 75.35.0.223
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/control-structures.for.php
Edit -- https://master.php.net/note/edit/68786
Del: integrated -- https://master.php.net/note/delete/68786/integrated
Del: useless -- https://master.php.net/note/delete/68786/useless
Del: bad code -- https://master.php.net/note/delete/68786/bad+code
Del: spam -- https://master.php.net/note/delete/68786/spam
Del: non-english -- https://master.php.net/note/delete/68786/non-english
Del: in docs -- https://master.php.net/note/delete/68786/in+docs
Del: other reasons-- https://master.php.net/note/delete/68786
Reject -- https://master.php.net/note/reject/68786
Search -- https://master.php.net/manage/user-notes.php