You could try something like this: eval( "\$class->" . $var . "_function();" );
/nico "Matt Williams" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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 part of the function name to call. > > TIA > > matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php