Ben html içinde bir bazı php kodu ile html bir dize döndürmek için çalışılıyor ve ben bunu yaparken biraz zorluk yaşıyorum. Örnek aşağıda:
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!