Jump to content

class within a class


doddsey_65

Recommended Posts

im trying to initialize a class within another class but it says the class cant be found:

 

class template
{
     public function create_sidebar($type)
     {
             include($config['asf_root'].'functions/forum_functions.php');
        
            $forum_tree     = new forum_display;
     }
}

 

and the forum_display class does exist in the included file:

 

class forum_display
{
    public $forums = array();
    
    function get_forum_listing()

 

 

Link to comment
https://forums.phpfreaks.com/topic/236827-class-within-a-class/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.