Hi there all.
Im new to PHP but having some troube in getting some simple bit of code to work.And I am trying...
I know that the syntax for a PhP if..Else test is basically:
<
if(condition)
dothis....
else
dothat....
>
But inside VBulletin when I go to edit my navbar template I see this:
HTML Code:
<if condition="$bbuserinfo['pmunread']">
<a href="http://www.pakistancricketzone.com/private.php?"><img border="0" src="http://www.pakistancricketzone.com/images/xbox/nonewpm.gif" width="220" height="13"></a>
Thats basically shows a graphic if there is an unread PM.But if there isnt I want it to show a different graphic. So I figured the best thing to do is a if..else statement. No matter what I do it seems to fall over or the else isnt recognised. Can someone tell me why?
HTML Code:
<if condition="$bbuserinfo['pmunread']">
<a href="http://www.pakistancricketzone.com/private.php?"><img border="0" src="http://www.pakistancricketzone.com/images/xbox/nonewpm.gif" width="220" height="13"></a>
<else>
<a href="http://www.pakistancricketzone.com/private.php?"><img border="0" src="http://www.pakistancricketzone.com/images/xbox/newpm.gif" width="220" height="13"></a>
</if>
As far as i can tell the angle brackets just help to keep selcted bits of code together in a block in php and should be translated into HTML at execution time....still dont know why its not working.Can anyone explain why to me please?
Many thanks,
Naeem
anyone???