I have a document file containing HTML markup. I want to assign the contents of the entire file to a PHP variable.
I have this line of code:
$body = in
Yes you can its easy.
In the file you want to use the variable place this
require_once ‘/myfile.php'; if(isset($responseBody)) { echo $responseBody; unset($responseBody); }
In the file you are calling /myfile.php place this
$responseBody = 'Hello world, I am a genius';
Thanks Daniel