I'm trying to use a heredoc string in one section of my script, and inside this heredoc string is a function from inside a class that inputs some dynamic bit of stuff.
The function outputs the code correctly... but in the wrong place. Here's what I mean:
$output = <<<HTML
blah blah
blah
blah blah
<select>
{$admin->dropAcctNumbers()}
</select>
blah blah
blah
HTML;
When this is displayed in the web browser, it shows the code echo'd from inside the dropAcctNumbers()
all the way up here:
<option>Account Numbers</option>
blah blah
blah
blah blah
<select>
</select>
blah blah
blah
When it should be here:
blah blah
blah
blah blah
<select>
<option>Account Numbers</option>
</select>
blah blah
blah
Any ideas?