Ok I have 2 classes a Database class and Miscellaneous class, The database class has mysql connection info and all the methods I use. I then have a miscellaneous class which has random methods I use. The problem is I need the miscellaneous class to use methods in from the database class. But I don't know how to create a new class int htere like the usual thing to do is
$db =new Database;
if I try that I get thisarse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/djago/public_html/socialnetworking/framework/misc.php on line 3
if I add this line
var $db =new Database;
Parse error: syntax error, unexpected T_NEW in /home/djago/public_html/socialnetworking/framework/misc.php on line 3
What do I do?
I think I answered this on PBS, but just in case anyone here has the same question, you would do something like this:
$db = new Database();
$db->method();
Thank you![]()
Glad to help![]()