Sometimes you have some complex Echo and in your String are  ’ or ” and you may come quit crazy with the delimeter of it  like:  echo “<a href=”goto.htm”>test</a>”.  Already you would created an Error by including ” in “”. Now you can choose to make outside ‘ or Inside. But when the Echo comes more complex, you may get some Headache where to use ” and where ‘ and where ` :)

For that Reason you can write your Output for the Echo in <<< label  (your content)  label; and all is done.

 

<?php

echo <<< _end_this

Just a Demo to see, that you can include ‘ or ” or ` in your Output without Problem.<br>Like for Standart Html Commands as <a href=”test.htm”><b>test</b></a><br> and so on :)

_end_this;

?>

Category: php
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>