alexjewell
06-17-2007, 11:28 PM
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:
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!
Say the page is writing.php?writing=poem1. Now, I make $_GET['writing'] a variable, $writing, and use the following statement:
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!