Check if member of group, if so, display

Started by samborabora, July 21, 2014, 11:38:51 AM

Previous topic - Next topic

samborabora

I can't work out what's the problem. This:

if (isset($message['member']['group']) && $message['member']['group'] = 'Section Mod' )
echo '
<li class="title" style="font-size:10px; color: #333; font-weight: bold;">Section Mod</li>
';


Gives EVERYONE the text, including the 'Section Mod'. However, THIS:
if (isset($message['member']['group']) && $message['member']['group'] != 'Section Mod' )
echo '
<li class="title" style="font-size:10px; color: #333; font-weight: bold;">Section Mod</li>
';


Actually removes the title from the members of 'Section Mod', and gives it to everyone else. What did I foul up on this time?

margarett

=
Is DIFFERENT from
==
That's why it gives everyone the text. You are assigning, not comparing ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

samborabora

Quote from: margarett on July 21, 2014, 11:42:43 AM
=
Is DIFFERENT from
==
That's why it gives everyone the text. You are assigning, not comparing ;)




Too embarrassing, thank you so much, Bruno ;) ;)

Advertisement: