AND or OR when using forumid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gomjaba
    Senior Member
    • Jan 2005
    • 970
    • 3.5.x

    AND or OR when using forumid

    I use

    Code:
    if ($forumid ==169)
    To show a specific code in a specific forum.

    I would like to show now the code in two forumids .. how would I have to change it ? Sorry .. I am kinda n00b (obviously) ..
    I'm not under the alkafluence of inkahol like some thinkle peep I am!
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Code:
    if ($forumid == 169 OR $forumid == 170)
    ...or:

    Code:
    if (in_array($forumid, array(169,170)))
    The second one is easier to add more forumids, just extend the comma list to include more numbers.

    Comment

    • Gomjaba
      Senior Member
      • Jan 2005
      • 970
      • 3.5.x

      #3
      Cheers Jake Much appreciated *thumbs up*
      I'm not under the alkafluence of inkahol like some thinkle peep I am!

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...