Ok, I've done a search through the mailing list for an answer, but none of the related posts answer my question.
I'm trying to send a function as an argument to another function and the output is not as expected.
Here's an example of the code:
function make_textarea() {
echo "<textarea cols=40 rows=8></textarea>";
}
function p_wrapper($item_to_wrap) {
echo "<p>";
echo $item_to_wrap;
echo "</p>\n";
}
p_wrapper(make_textarea());
So what I want to be output is:
<p><textarea cols=40 rows=8></textarea></p>
Instead I get:
<textarea cols=40 rows=8></textarea><p></p>
Any suggestions?
Much thanks in advance 🙂