如何在PHP字符串&内获取突出显示HTML语法的信息;Heredoc语法? [英] How do I get HTML syntax highlighting inside PHP strings & heredoc syntax?

查看:44
本文介绍了如何在PHP字符串&内获取突出显示HTML语法的信息;Heredoc语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Sublime Text和Darkels用作主题.我选择的语言是PHP.我如何在PHP字符串&中获取突出显示HTML语法的信息?Heredoc语法?

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?

推荐答案

以您使用的语言命名您的heredocs.这将在许多文本编辑器(包括Sublime Text)中突出显示语法.

Name your heredocs after the language you are using. This will syntax highlight in many text editors, including Sublime Text.

例如:

echo <<<HTML
<!-- put HTML here and it will have syntax highlighting -->
HTML;

这篇关于如何在PHP字符串&amp;内获取突出显示HTML语法的信息;Heredoc语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆