Using if statement in array
Hey Folks
I have following coding which populate a menu "Message" through array,
Code:
menu_contents('menu', array(
'name' => 'messages',
'href' => 'messages/mailbox',
'text' => 'Message',
));
The above coding displays a menu name "Message"
I need to add the following if statement in the above array, which displays the number of messages with the menu as Messages(1) or Messages(2)
but for messages(0) it only displays "Messages" instead of Messages(0)
Code:
if ($messages != 0) {
$output = "<div class=\"messages\">($messages)</div";
}
Is there any idea how can we do that ? FYI $message in already defined and there is no issue with that
You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD.....When you feel you are alone for facing your problems, God will never leave you by your own You are important for God
Bookmarks