dynamic-function

How to call PHP function from string stored in a Variable

I need to be able to call a function, but the function name is stored in a variable, is this possible? e.g: function foo () { //code here } function bar () { //code here } $functionName = "foo"; // i need to call the function based on what is $functionName Anyhelp would be great. Thanks! ...

Lua : Dynamically calling a function with arguments.

Using Lua, I'm trying to dynamically call a function with parameters. I want to send a string to be parsed in a way that: 1st argument is a class instance "Handle" 2nd is the function to be called All that is left are arguments "modules" is a a table like { string=<instance of a class> } split() is a simple parser that returns a tabl...

dynamic action names in codeigniter or any php mvc framework

I've noticed many sites are able to use a username or page title as an action. How is this done? For example instead of www.example.com/users/my_username (where the users action is generic and responsible for fetching user data) how could I make this www.example.com/my_username? Thanks very much. ...

Dynamic functions, variable inputs

Right now, lets say I have code much like this... $some_var=returnsUserInput(); function funcA($a) {...} function funcB($a,$b) {...} function funcC($a,$b,$c) {...} $list[functionA] = "funcA"; $list[functionB] = "funcB"; $list[functionC] = "funcC"; $temp_call = list[$some_var]; //Not sure how to do this below, just an example to show...