Re: Globals defined in functions

From: Date: Thu, 01 May 2003 21:19:34 +0000
Subject: Re: Globals defined in functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146011@lists.php.net to get a copy of this message
On Thu, 1 May 2003, Liam Gibbs wrote: > function TableExists($tablename) { > global $_CUSTOMIZE["databasename"]; > . > . > . > } > > anyway, the global line causes a parse error. Does anyone have an option for me? You can't make elements of an array global. You have to make the entire array global. eg. function() { global $_CUSTOMIZE; .. } -Rasmus

« previous php.general (#146011) next »