Announcement

Collapse
No announcement yet.

Help with php code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mark Hensler
    replied
    That could get long quick. If your adventurous, try this:
    PHP Code:
    $valid_forums = array(789);

    if (
    $counter==&& $pagenumber==&& in_array($thread[forumid], $valid_forums)) { 
    PHP Docs: in_array()

    Leave a comment:


  • c-prompt
    replied
    Surprised it worked? lol

    Leave a comment:


  • Jake Bunce
    replied
    Originally posted by c-prompt
    Thanks bro it worked beautifully!


    wow, ok

    Leave a comment:


  • c-prompt
    replied
    Thanks bro it worked beautifully!

    Leave a comment:


  • Jake Bunce
    replied
    i'm no expert but i would think...

    PHP Code:
    if ($counter==and $pagenumber==and ($thread[forumid]==|| $thread[forumid]==|| $thread[forumid]==9)) { 
    i think this if statement will evaluate to true if $thread[forumid]==7, 8 or 9. i think!
    Last edited by Jake Bunce; Tue 12 Feb '02, 12:41am.

    Leave a comment:


  • c-prompt
    started a topic Help with php code

    Help with php code

    In one of my files I am using the following code:

    Code:
    if ($counter==1 and $pagenumber==1 and $thread[forumid]==7) {
    My question is how to I add more forumids to the "$thread[forumid]==7" area? The if statement will carry over 3 forums. I tried just adding a comma and then the other forum id's but I get a parse error. What is the correct way of adding more to it?

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