PDA

View Full Version : Another <if> Problem


FrozenCreations
08-30-2005, 11:55 PM
i was wondering how 2 make this code work? im writing it now, and dont know if it works /;

and/or can i put this into a template an will it work?

<?php
if (is_member_of($bbuserinfo, 2)) {
echo 'TEXT for usergroup id#2';
}
else {
(is_member_of($bbuserinfo, 4))
echo 'TEXT for usergroup id#4';
}
?>


now rember, im a complete noob at php /; please tell me how i did 4 a complete noob!

Adrian Schneider
08-31-2005, 12:49 AM
PHP:if (is_member_of($bbuserinfo, 2))
{
echo 'text for usergroup 2';
}
elseif (is_member_of($bbuserinfo, 4))
{
echo 'text for usergroup 4';
}

Template:
<if condition="is_member_of($bbuserinfo, 2)">
text for usergroup 2
<else />
<if condition="is_member_of($bbuserinfo, 4)">
text for usergroup 4
</if>
</if>