How do I write this PHP syntax/function?
Posted on 2009-04-01
I have a php function that I have broken down to simplify my question.
Basically, I want the function to insert php code to wherever it's called.
NB. I don't want it to display code to the viewer, just to the server.
So if I call fake()...it would be as if I had coded:
<span class='sv'><?php echo $message ?></span>
The variable $message is declared earlier on the page.. When fake() is called...it will echo the value of $message inside the span...and the viewer will be able to see what $message says (formatted according to class sv).
I know this question seems silly, but I have simplified my actual code so that I the question can be more easily answered.
Thanks in advance!