Re: Including classes inside functions vs outside - scope/global [solved]

From: Date: Tue, 02 Sep 2003 20:10:26 +0000
Subject: Re: Including classes inside functions vs outside - scope/global [solved]
Groups: php.general 
Request: Send a blank email to php-general+get-161474@lists.php.net to get a copy of this message
Hi Greg, I've been on a holiday and just got to ttry this last night. Worked like a charm. Thank You! Salut, verdon > Hi Verdon, > > Be sure that $connobj is declared as a global variable in the > mysql_connection.php file. You can do this in two ways: > > 1) instead of $connobj = blah, use $GLOBALS['connobj'] = blah 2) global > $connobj; $connobj = blah > > Regards, Greg -- phpDocumentor http://www.phpdoc.org > > Verdon Vaillancourt wrote: Hi :) > >> Somewhat newbie question... >> >> I'm trying to include some open source classes into a project I am working >> on. The classes build a set of relational select menus from the contents of >> two tables. I have not trouble using the classes in a simple test page, but >> am running into problems when I try to use them as part of a function. For >> instance...

« previous php.general (#161474) next »