RE: [PHP] Capturing Eval'd things into a variable...

From: Date: Mon, 27 Nov 2000 21:40:30 +0000
Subject: RE: [PHP] Capturing Eval'd things into a variable...
Groups: php.general 
Request: Send a blank email to php-general+get-27453@lists.php.net to get a copy of this message
Any ideas why the following code yields a: Fatal error: Call to a member function on a non-object in /usr/www/templates/user-prompt-top.ihtml on line 6 (Validate DOES exist as a Function of the User class in user.lib.php) <?PHP require "/usr/www/lib/user.lib.php"; $Userr = new User; Function Prompt(){ Global $Userr; $Userr->Validate(); $o .= $Userr->Nick_Buscas(); return $o; } ?> > -----Original Message----- > From: Ignacio Vazquez-Abrams [mailto:ignacio@openservices.net] > Sent: Monday, November 27, 2000 6:30 PM > To: Roy Nasser > Cc: 'Jason Brooke'; Joe Conway; Php (E-mail) > Subject: RE: [PHP] Capturing Eval'd things into a variable... > > > On Mon, 27 Nov 2000, Roy Nasser wrote: > > > I just have one more question... I know that i can do > something like: > > > > $Var = "VariableName"; > > > > echo $$Var; > > > > and it will be the same as > > > > echo $VariableName; > > > > Now is there a way to do this with a funciton? > > > > Such as: > > > > $Fun = "FunctionName"; > > $Fun(); > > > > being the same as FunctionName(); > > > > Yes on both counts. > > Additionally, you can say "${"foo".$bar}" and it will be > treated as a variable > with the name of "foo" with the value of $bar concatenated to it. > > -- > Ignacio Vazquez-Abrams <ignacio@openservices.net> > >

« previous php.general (#27453) next »