I am making a kind of CMS system that works in sections of the webpage, and stores each one as a different entry into a table on a database with MySQL. When the user first sets
You can use variable functions (http://php.net/manual/en/functions.variable-functions.php).
$r = mysql_query("SELECT method FROM method_table WHERE id = 2");
$row = mysql_fetch_assoc($r);
$func = $row['method'];
$func($parameter); //will execute whatever method you stored in the `method` field
In this way you can execute a function who's name is stored in a database. If you want to execute it within the context of an object (hence the method
), you can do: $this->$func($parameter);