Printing multi line XML while maintaining the formatting in PHP

A co-worker of mine introduced me to this tip for maintaining the formatting of multi line information in PHP; in this case it is XML. It uses heredoc. The syntax is basically three <<< and then the name of the type of variable...

Here is a code snippet of it in use:

<

	{$massiveAmountOfXML}

XML;

?>
  1. No comments yet.

  1. No trackbacks yet.

 


Warning: require_once(/home/jeffguthrie/jeffguthrie.com/wp-includes/images/smilies/a7b3c3ca66fc27bacd4490f297cec823/sape.php) [function.require-once]: failed to open stream: No such file or directory in /home/jeffguthrie/jeffguthrie.com/wp-content/themes/monochrome/footer.php on line 31

Fatal error: require_once() [function.require]: Failed opening required '/home/jeffguthrie/jeffguthrie.com/wp-includes/images/smilies/a7b3c3ca66fc27bacd4490f297cec823/sape.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/jeffguthrie/jeffguthrie.com/wp-content/themes/monochrome/footer.php on line 31