SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot ComposerRyan's Avatar
    Join Date
    Oct 2003
    Location
    USA
    Posts
    196
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Very simple PHP question...select multiple IDs with elseif statement?

    I am quite new to php but I managed to combine two IF statements into one. However, I am now having problems with the elsif part of the statement.

    Here it is:

    Code:
    <?php elseif($listing['Category']['cat_id'] == 73):?>
    I need to be able to select multiple category ids...or, better yet have it say ELSE IF "SHOW ANY CATEGORY BUT CATEGORY 74"

    How would I go about doing this? Thanks for helping out!

  2. #2
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the not equal instead of equals comparison operator.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •