3 ms·
PHP has multiple ways to mix HTML and PHP, that’s part of its design. The simplest way to put a block of HTML inside PHP code is with the heredoc string syntax.
by gregjor 7y ago
PHP has multiple ways to mix HTML and PHP, that’s part of its design. The simplest way to put a block of HTML inside PHP code is with the heredoc string syntax. As of PHP 7.3 heredocs allow indenting of the closing label, fixing the slight ugliness of heredocs.
You can also just switch in and out of PHP to an HTML block.