Hey guys, I have a little problem here, I have one class to create queries to a mysql database, this class works fine, but, now I want to create an instance of this class inside another class but I'm receiving the error:
Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in D:\InetPub\hispanicroot\includes\database.php on line 134 This is my code: class SubMenu { var $attrib = array("level"=>"", "page"=>"", "section"=>""); $DBQuery = new DBQueries; <--------------------------- this is line 134 $DBQuery->attrib["type"] = "select"; $DBQuery->attrib["query"] = "SELECT ID_Secpage, PageType, Title, PageURL FROM inf_secpages WHERE ID_Page = " . $attrib['page'] . " ORDER BY Slot ASC"; $GetData = $DBQuery->RunQuery(); bla bla bla .......... } If I use: var $DBQuery = new DBQueries; then I receive the error: Parse error: parse error, unexpected T_NEW in D:\InetPub\hispanicroot\includes\database.php on line 134 Thanks Jadiel Flores ------------------------- http://www.abargon.com [EMAIL PROTECTED] (52-55) 52-29-80-34 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php