Well, the forums are the first thing I'm doing but I'm having an error with my SQL.
SELECT * FROM categories_tbl LEFT JOIN forums_tbl ON (forums_tbl.parent_id = categories_tbl.category_id) WHERE category_id=parent_id
The results of the var_dump:
array(2) { [0]=> array(18) { ["category_id"]=> string(1) "1" [0]=> string(1) "1" ["category_name"]=> string(7) "General" [1]=> string(7) "General" ["category_parent_id"]=> string(1) "0" [2]=> string(1) "0" ["forum_id"]=> string(1) "1" [3]=> string(1) "1" ["forum_name"]=> string(8) "Welcome!" [4]=> string(8) "Welcome!" ["forum_created"]=> string(19) "2013-05-31 18:25:46" [5]=> string(19) "2013-05-31 18:25:46" ["forum_legend"]=> string(27) "Introduce yourself in here!" [6]=> string(27) "Introduce yourself in here!" ["parent_id"]=> string(1) "1" [7]=> string(1) "1" ["forum_createdby"]=> string(7) "Akhaten" [8]=> string(7) "Akhaten" } [1]=> array(18) { ["category_id"]=> string(1) "2" [0]=> string(1) "2" ["category_name"]=> string(9) "Computers" [1]=> string(9) "Computers" ["category_parent_id"]=> string(1) "0" [2]=> string(1) "0" ["forum_id"]=> string(1) "2" [3]=> string(1) "2" ["forum_name"]=> string(15) "PHP is Awesome!" [4]=> string(15) "PHP is Awesome!" ["forum_created"]=> string(19) "2013-05-31 18:25:46" [5]=> string(19) "2013-05-31 18:25:46" ["forum_legend"]=> string(18) "Let's all use PHP." [6]=> string(18) "Let's all use PHP." ["parent_id"]=> string(1) "2" [7]=> string(1) "2" ["forum_createdby"]=> string(5) "xLink" [8]=> string(5) "xLink" } }