heredoc

Let’s hear it for HEREDOC

by Kev on 8 September, 2008

I’ve been using PHP seriously for a while now, and overall I think it’s the most productive programming language I’ve ever encountered. However, one of the things, as a PHP programmer, you need to do on a regular basis is to output HTML to the browser in order to draw web pages.

The problem is that HTML uses the ” (quote) character and so does PHP so, if you want to use a bit of HTML like this:

<p class=”indentedbody”>Here is some text.</p>

you need to handle them specially in PHP. [click to continue…]

Use Facebook to Comment on this Post