Hi php-general, I have a question about eval();
I'm having multiple pagenames I store in a database. I also have a lot of functions starting with "content" and then the name of the pages taken from the database. Ex: pagenames = about,download functions = contentAbout(), contentDownload(). Now I would like to have a loop of if to make the decision which function to use, like: for($i = 0; $i < sizeof($databasepagename);$i++){ if($_SERVER["PHP_SELF"] == $databasepagename[$i]) eval("content".$databasepagename[$i]."();"); } but that doesn't work... How could I achieve that? Thanks for answering... SvT -- Who is the ennemy? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php