Add to include

Can this code be written somehow without using a buffer?


Answer 1, authority 100%

You can, if in theme/post.phpdo not echo "...", but something like $html .= "..."and at the end of the return $html. http://php.net/manual/en/function.include.php, Example #5.


Answer 2

To be honest, I don’t know, but in my opinion it’s impossible, you can only put the result of connecting a file into a variable (true/false).