Get the function name from the url?
I'm working on a writings section in my website. What I want to do is the following:
Say the page is writing.php?writing=poem1. Now, I make $_GET['writing'] a variable, $writing, and use the following statement:
PHP Code:
if($writing == 'poem1'){poem1();}
Now, as you can see, the piece itself is a function. There's a few reasons it has to be a function. Is it possible to set the function name to the variable $writing? As the site gets more complex, that would be ideal. For example: ($writing)(); or $writing(); or something?
Help!
Thou com'st in such a questionable shape
Hamlet, Act 1, Scene 4
Bookmarks