Hi there, I'm attempting to return a string of html with an some php code within the html and I'm experiencing a bit of difficulty doing so. Example below:
return '//bunch of html here
<div id="test">
<?php
if (isset($_COOKIE[\"cannycookie\"]))
{
echo "<a class=\"reply\" href=\"#\" id=\"deletelink-'.$d['id'].'\">Delete</a>";
}
?>
</div>';
The html before this all returns perfectly, but when it gets to the ">Delete</a>";}?>
something crashes and burns.
The html renders in the browser like so: Delete\n"; } ?>
with the whole php source being exposed. I've tried reading up other posts and information on quotes in statements as such, and I've tried as much as I can, yet to no avail. Any ideers? Thanks!