note 110804 deleted from multipleiterator.construct by aharvey
| From: | aharvey@php.net | Date: | Tue, 11 Dec 2012 01:50:32 +0000 |
| Subject: | note 110804 deleted from multipleiterator.construct by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192450@lists.php.net to get a copy of this message | ||
Note Submitter: laura_trea at NOSPAM dot hotmail dot com
----
Here an other example
<?php
$flag=MultipleIterator::MIT_KEYS_ASSOC;
$people = new ArrayIterator(array('John', 'Jane', 'Jack',
'Judy'));
$roles = new ArrayIterator(array('Developer', 'Scrum Master', 'Project
Owner','Client'));
$team = new MultipleIterator($flag);
$team->attachIterator($people, 'person');
$team->attachIterator($roles, 'role');
foreach ($team as $member) {
$name = $member['person'];
$charge = $member['role'];
echo $name ." is a ".$charge;
echo "<br/>";
}
?>