I'm probably doing something stupid that I just can't see (it is 3:30am here).
Here is the result of print_r($children):
Array
(
[0] => Array
(
[id] => 1380
[fname] => Mary
[lname] => Contrary
[status] => 1
[type] => 2
[email] => Mary.Contrary@nowhere.xxx
)
[1] => Array
(
[id] => 1378
[fname] => Jane
[lname] => Doe
[status] => 0
[type] => 2
[email] => Jane.Doe@nowhere.xxx
)
[2] => Array
(
[id] => 1379
[fname] => John
[lname] => Smith
[status] => 1
[type] => 1
[email] => John.Smith@nowhere.xxx
)
)
So it appears to correctly have 3 first-dim elements, each a correctly populated array. However, when I run the following code...
<ul>
<?php
reset($children); // added this just in case, but no help
foreach($children as $child);
{
printf(
"<li><a href='mailto:%s' title='Email %s'>%s %s <img src='/images/email.png' style='border:none'></a></li>\n",
$child['email'],
$child['fname'],
$child['fname'],
$child['lname']
);
}
?>
</ul>
...it only outputs data for the last element:
<ul>
<li><a href='mailto:John.Smith@nowhere.xxx' title='Email John'>John Smith <img src='/images/email.png' style='border:none'></a></li>
</ul>
Anyone see what I'm doing wrong?