IMHO if you have your PHP script output "long HTML strings" like this you are doing something wrong. You should keep your logic (PHP code) and HTML separate. In this case put the HTML in a separate file and include it when needed. – RoToRa Dec 22 '10 at 14:32

PHP: PHP and HTML - Manual PHP and HTML interact a lot: PHP can generate HTML, and HTML can pass information to PHP. Before reading these faqs, it's important you learn how to retrieve variables from external sources. The manual page on this topic includes many examples as well. What encoding/decoding do I need when I pass a HTML For Beginners The Easy Way: Start Learning HTML & CSS Jan 01, 2020 How to Use PHP with HTML5 Programming - dummies

PHP Introduction - W3Schools

HTML to PHP Converter,Parser,Transformer Online Utility. Load form URL, Download, Save and Share. How To Retrieve HTML Form Data With PHP

How do I get the HTML code of a web page in PHP? - Stack

Sep 27, 2018