I have three classes that all have a static function called \'create\'. I would like to call the appropriate function dynamically based on the output from a form, but am hav
I may be misunderstanding what you want, but how about this?
switch ($_POST['ClassType']) { case "Class1": $class1::create(); break; case "Class2": $class2::create(); break; // etc. }
If that doesn't work, you should look into EVAL (dangerous, be careful.)