I'm using Sublime Text with the Pastels on Dark theme. My language of choice is PHP. How can I get HTML syntax highlighting inside PHP strings & heredoc syntax?
The highlight_string() function outputs a string with the PHP syntax highlighted. The string is highlighted by using HTML tags. The colors used for syntax highlighting can be set in the php. ini file or with the ini_set() function.
The <mark> tag in HTML is used to define the marked text. It is used to highlight the part of the text in a paragraph.
Name your heredocs after the language you are using. This will syntax highlight in many text editors, including Sublime Text.
For example:
echo <<<HTML
<!-- put HTML here and it will have syntax highlighting -->
HTML;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With