Re: [PHP] using a variable to a function call

2002-03-08 Thread Matt Williams
On Thursday 07 March 2002 19:21, Lars Torben Wilson wrote: > // The direct way: > $foo->{$test . '_foo'}(); Thanks Lars This was what I was looking for, just couldn't remember the syntax -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] using a variable to a function call

2002-03-07 Thread Lars Torben Wilson
On Thu, 2002-03-07 at 06:25, Matt Williams wrote: > Hi all > > I get a variable that is set be a select box on a page. > I want to use this variable to call a function within a class that is based > on it's name. > > so if $var = "me" > > I want to call $class->me_function(); > > or if > >

Re: [PHP] using a variable to a function call

2002-03-07 Thread Edward van Bilderbeek - Bean IT
. } function me_function() { ... } } $class = new test(); $class->do($var); Greets, Edward - Original Message - From: "Matt Williams" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, March 07, 2002 3:25 P

[PHP] using a variable to a function call

2002-03-07 Thread Matt Williams
Hi all I get a variable that is set be a select box on a page. I want to use this variable to call a function within a class that is based on it's name. so if $var = "me" I want to call $class->me_function(); or if $var = "you" call $class->you_function(); How can I use the variable as p