+ Reply to Thread
Results 1 to 4 of 4

Thread: php and mysql forum

  1. #1
    maddude is offline overall phsyco maddude is an unknown quantity at this point
    Join Date
    Feb 2005
    Posts
    128

    php and mysql forum

    :original: i know its possible to display forums by using the while() command to go through and print each one and its details but when it comes to categories and forums theres a different amount of each so how would i go about displaying forum categories and the forum stats when the categorys are in an array named $cat_list and then forums for each category are in arrays $categoryname_forums and the array of topic numbers is $topic_nums and the post numbers are in array named $post_Array so how would i print it?
    willing to give away battleofthehandhelds.info for a link to any good nintendo ds and sony psp dedicated site :grin: x10hosting the best hosting on the web!

  2. #2
    CheetahShrk is offline x10 Sophmore CheetahShrk is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    102

    Re: php and mysql forum

    Its alot easier just to use mysql and while and foreach commands (actually im not sure if its foreach or for, my C++ knowledge is screwing my up) Just make it print out the catergory, then any forum what the cat id of the catergory, then the stats could be like the row count of the posts table and the topic table where the forum id is the id of the forum, its alot easier then using arrays.

  3. #3
    maddude is offline overall phsyco maddude is an unknown quantity at this point
    Join Date
    Feb 2005
    Posts
    128

    Re: php and mysql forum

    look maybe i didn't explain:
    <?php
    while($num<$forum_count) {
    print("<tr><td>$forum_names[$num]</td><td>$forum_posts[$num</td><td>$forum_topics[$num</td></tr>");
    }
    ?>
    will display forums i know thats not my problem its the fact that cause theres less categorys than there are forums i need a while() or for() or foreach() statement to get all the forums for that particular category and the topics and post for each individual one and display them with in that while() statement and thats where it goes bonkers :blushing:
    willing to give away battleofthehandhelds.info for a link to any good nintendo ds and sony psp dedicated site :grin: x10hosting the best hosting on the web!

  4. #4
    maddude is offline overall phsyco maddude is an unknown quantity at this point
    Join Date
    Feb 2005
    Posts
    128

    Re: php and mysql forum

    so im already using while statements to check each category but how do i intergrate the forums for each category and thier thread and post numbers etc for each one tell you what its not much of an offer but the first one to come up with a useable solution to print each forum name and its propertys for each category using while for and foreach statements will get cyberextreme.info for 8 months FREE! :online2lo
    willing to give away battleofthehandhelds.info for a link to any good nintendo ds and sony psp dedicated site :grin: x10hosting the best hosting on the web!

+ Reply to Thread

Similar Threads

  1. [PHP] MySQL and PHP
    By Bryon in forum Tutorials
    Replies: 43
    Last Post: 03-24-2011, 08:27 AM
  2. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 11:07 AM
  3. Some help with some php mysql communication.
    By Sheepoholics in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 04-01-2006, 04:34 PM
  4. Php And Mysql Forum Rephrased!
    By maddude in forum Scripts & 3rd Party Apps
    Replies: 7
    Last Post: 04-05-2005, 01:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers