Hello,
I want to create an HTML page with variables in it and then turn the entire page string into a variable so I may send a client an HTML email. In the example below I'm using arrays however:
$arrayValue[0] = "Hello ";
$arrayValue[1] = '$firstName';
$arrayValue[2] = " ";
$arrayValue[3] = '$lastName'. "\n" ;
array_unshift($arrayValue, "echo <<<EOT\n");
array_push($arrayValue,'EOT;');
$newString = implode("",$arrayValue);
$newString = eval( $newString);
This doesn't give me the result I was expecting, and the error call is always on the last line of the eval statement.
Any insightful suggestions on this strategy? Additionally, the page I'm wanting to send would contain just $variables, but I'd like to also send a more complex page with control loops or etc. in it.
Thank you for helping.
Sam Fullman
Compass Point Media