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