image in duplicate group

53 views
Skip to first unread message

Sébastien

unread,
Sep 29, 2010, 5:45:26 PM9/29/10
to Magic Fields
i use duplicate group, and I have an image in each group. What can i
display each photo ?
i used this code :
$team = get_group(‘team’);
foreach($team as $member){
echo $member['namemember'][1];
echo “”;
echo $member['photomember'][1];
echo “”;
}

for the name it’s ok, but the photo is always the same for each
member…
could you help me ?




the content of pr($team) is

Array
(
[1] => Array
(
[photo] => Array
(
[1] => Array
(
[o] => http://toto.com/wp-content/files_mf/1285786830Tree.jpg
)

)

[nom] => Array
(
[1] => sergio
)

)

[2] => Array
(
[photo] => Array
(
[1] => Array
(
[o] => http://toto.com/wp-content/files_mf/1285787116TocoToucan.jpg
)

)

[nom] => Array
(
[1] => tobi
)

)

)

what is the code to display each images of each duplicate group

Traversal

unread,
Sep 29, 2010, 9:42:43 PM9/29/10
to Magic Fields
hey, the trick there is to use the "o" property, and provide your own
image tag.

Something like this in your foreach loop:

<img src="<? php echo $member['photomember'][1]['o'] ?>" />

That should work :)

Sébastien

unread,
Sep 30, 2010, 5:15:26 AM9/30/10
to Magic Fields
thanks, i have find the response
thx :-)
Reply all
Reply to author
Forward
0 new messages