I have a variable which stores the HTML code for a form, but I would like to add a PHP function inside. Here's what it looks like:
<?php
function example_function() {
// code
}
$form = '
<form action" <!-- etc. --> >
<input <!-- etc. --> >
<input value="<!-- example_function() should go here -->" <!-- etc. --> >
</form>';
?>
Any ideas on how I would add that function in there? I looked at many other similar topics, but none of them seemed to resolve this problem (I also had a look at Variable Functions in the documentation, but I don't think that would solve the problem).
Note: the form works fine without the function.
// code?