Page 1 of 1

Simple question about "if" and "else"

Posted: Fri May 22, 2009 8:27 am
by Majes
Hi all. I've got this piece of code that is not working. It's from a phpbb3 forum

Code: Select all

<!-- IF (U_GALLERY_LINK_ID=="./gallery/menu.php?gallery=members&album_id=0") -->
Album id is 0
<!-- ELSE -->
albumid is anything but 0
<!-- ENDIF -->
U_GALLERY_LINK_ID gives an url (./gallery/menu.php?gallery=members&album_id=) ended with a number. I want to do something when it's 0, and another thing when it is another number...

What can I do?

Re: Simple question about "if" and "else"

Posted: Fri May 22, 2009 12:12 pm
by Griven
.

Re: Simple question about "if" and "else"

Posted: Fri May 22, 2009 1:29 pm
by anand
Majes wrote:Hi all. I've got this piece of code that is not working. It's from a phpbb3 forum

Code: Select all

<!-- IF (U_GALLERY_LINK_ID=="./gallery/menu.php?gallery=members&album_id=0") -->
Album id is 0
<!-- ELSE -->
albumid is anything but 0
<!-- ENDIF -->
U_GALLERY_LINK_ID gives an url (./gallery/menu.php?gallery=members&album_id=) ended with a number. I want to do something when it's 0, and another thing when it is another number...

What can I do?
How about an elseif ($criterion == '0')