I would like to make a php file i have a part of a variable i’m building.
ie
$print = 'something';
$print .= include('register_form.php');
print $print;
However this doesn’t work. register_form.php will be not be included in the $print var, and will be echo’d out before the start of the print out.
Is there a way to achieve this?
I know I could go into register_form.php and make it all a function like register_form() and return its output, however, due to the way I’ve structured this (and i’m a bit of a newb) this would create more headaches then if I could merely do the above attempt.
Thanks for any pointers!
You can do this instead through output buffering.