PDA

View Full Version : Multiple conditional problem


CrashfAB
03-16-2010, 04:41 AM
So I have learned alot as of recent on php--but I still hitting a brick wall..

A little background so the code makes sense. My paid subscription usergroup is 21 and my user of the month is 11. The normal subscription usergroup has an image next to there name and when they become a user of the month I want a different image next to there name. Any help would be apreciated as I am sure its a simple deal but one I simply cannot figure out.

<if condition="$post['usergroupid']==11 and $post['usergroupid']==21"><img src="images/stars/gear-star.gif">

</else><if condition="$post['usergroupid'] ==21"><img src="images/stars/red-star.png"></if></if>

--------------- Added 1268722979 at 1268722979 ---------------

Finally figured it out. For anybody who has this issue here is what I did

<if condition="$post['usergroupid'] ==21 & is_member_of($post, 11)"><img src="images/stars/gear-star.gif">
<else /><if condition="$post['usergroupid'] ==21"><img src="images/stars/red-star.png"></if></if>