image in duplicate group

瀏覽次數:51 次
跳到第一則未讀訊息

Sébastien

未讀,
2010年9月29日 下午5: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日 晚上9: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日 清晨5:15:262010/9/30
收件者:Magic Fields
thanks, i have find the response
thx :-)
回覆所有人
回覆作者
轉寄
0 則新訊息