image in duplicate group

已查看 51 次
跳至第一个未读帖子

Sébastien

未读,
2010年9月29日 17:45:262010/9/29
收件人 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

未读,
2010年9月29日 21:42:432010/9/29
收件人 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

未读,
2010年9月30日 05:15:262010/9/30
收件人 Magic Fields
thanks, i have find the response
thx :-)
回复全部
回复作者
转发
0 个新帖子