* Thus wrote ARico: > Using Variable Variables works fine inside functions for global > defined variables if you declare them as global inside the function. > Suprinsingly, it does not seem to work with superglobals. Take the > following example: > > // code //////////////////////////////////////////////////////////// > ... > // End ////////////////////////////////////////////////// > > I'm doing something wrong? Or this is the expected behavior? I know > I could use php references, but linking style does confuse me a bit ( > how do you change a reference to point to a new variable if it's > allready referencing another one ? )
This is expected behaviour and is noted in the manual as well: http://php.net/variables.predefined <manual> Variable variables: Superglobals cannot be used as variable variables inside functions or class methods. </manual> Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php