I\'m very new to PHP so I know I am missing something obvious here - I thought the heredoc function is supposed to retain formatting, line breaks, etc. But whenever I test
It does, but only for what it outputs.
If it outputs HTML, then that HTML is going to be interpreted by a browser using the normal rules for handling whitespace.