Simple question about "if" and "else"

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Majes
Forum Newbie
Posts: 1
Joined: Fri May 22, 2009 8:24 am

Simple question about "if" and "else"

Post 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?
Griven
Forum Contributor
Posts: 165
Joined: Sat May 09, 2009 8:23 pm

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

Post by Griven »

.
Last edited by Griven on Sat May 23, 2009 11:43 am, edited 1 time in total.
anand
Forum Commoner
Posts: 80
Joined: Fri May 22, 2009 11:07 am
Location: India
Contact:

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

Post 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')
Post Reply