php and mysql forum

maddude

overall phsyco
Messages
256
Reaction score
0
Points
0
:eek:riginal: 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?
 

CheetahShrk

New Member
Messages
204
Reaction score
0
Points
0
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.
 

maddude

overall phsyco
Messages
256
Reaction score
0
Points
0
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:
 

maddude

overall phsyco
Messages
256
Reaction score
0
Points
0
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! :eek:nline2lo
 
Top