Re: RE: GtkCombo global variables problem

From: Date: Tue, 08 Jun 2004 17:32:56 +0000
Subject: Re: RE: GtkCombo global variables problem
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4637@lists.php.net to get a copy of this message
On Tue, 8 Jun 2004 16:17:11 +0100 "Rhys Campbell" <rhys.campbell@da-systems.co.uk> wrote: > Seems we need to declare it as being global upon birth and when we access > it. Not too troublesome now I know but the lack of an error previously did > throw me a bit. Could this be considered a bug??? Not if I understood correctly what you were trying to do. If you want to access a global variable from inside a function you have to either declare it as global or use $GLOBALS. It's normal with PHP, but it's somewhat different from other languages, where global variables are automatically visible inside function scope. Perhaps that threw you off? -- Ciprian Popovici

« previous php.gtk.general (#4637) next »