problem with class

From: Date: Fri, 25 Apr 2003 14:38:27 +0000
Subject: problem with class
Groups: php.general 
Request: Send a blank email to php-general+get-145264@lists.php.net to get a copy of this message
hi.. i have in an include file this: ##db.set## //variable used in other files $conf["date"]=date("M-d-Y"); $conf["log"]=date("M-d-y"); //...... ##end## now in the class file i have this: ##db.lib### require("db.lib"); classdb{ var $_db=""; global $conf[];//make the $conf array global now..worked //before but doesnt work now //now try to use it function Echo(){ echo $conf["date"]; echo $conf; }} ###end### now on output all i get for an error was parse error expecting t_old_function t_function t_var or } in db.lib on line 8 and for some reason it comes back to that $conf array in the other file... if i take out the global $conf[]; statement out of the class and put it just under the require statement or if i put it inside a function statement it will make the error go away but when i try to echo them it comes up with a blank screen what is wrong with it.. i did this once before and it worked but dont know why this time its not working...

« previous php.general (#145264) next »