SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2012
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    This is confusing me...

    I've been looking at this for a while now, but I just can't seem to understand (maybe it's because I'm still a beginner at PHP). On the PhpBB development wiki, there's a page "Displaying posts and topics on external pages" and the part where it says "By leaving the array "$forum_id" empty, it will mean there are no restrictions and it will take the latest posts/topics from the entire forum instead of any particular area." but the array (to me) is not empty since it has numbers.

    PHP Code:
    $search_limit 5;

        
    $forum_id = array(25);
        
    $forum_id_where create_where_clauses($forum_id'forum');

        
    $topic_id = array(2050);
        
    $topic_id_where create_where_clauses($topic_id'topic'); 

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,870
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    $forum_id = array(2, 5);

    display posts and topics from forums 2 and 5 only

    $forum_id = array();

    display posts and topics from all forums.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2012
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, I'm so stupid, how could I have not realized the numbers were the actual forum id *face palm* but thanks for the help!


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
  •