0

当我们echo在 PHP 中使用时,引号内的代码是 HTML。

在我使用的一些 HTML 编辑器中,它们只是以一种颜色突出显示所有 HTML,因此有点混乱。

有没有可以在里面着色的IDE echo

4

4 回答 4

1

唯一真正让您感到困惑的是回显 HTML 是否有很多。你总是可以:

 echo {
 ?>
 HTML
 <?php
 }
于 2013-04-03T04:20:28.640 回答
0

Do you mean the colouring for text inside " "? Try PHPStorm (http://www.jetbrains.com/phpstorm/). They offer a 30 day free license to try out the product.

于 2013-04-03T04:01:27.883 回答
-1

I'm not fully confident I understand what you want, but I believe you're asking if a code editor can also do HTML syntax-highlighting for HTML that exists inside PHP's echo/print statements. Normally not, because most editors see these as strings. However, you can embed PHP into HTML and that usually works a lot better:

<h1><?php print $someVar ?></h1>

If I misunderstood you, and you want syntax-highlighting for the web page...

There are plenty of javascript-based syntax-highlighters out there:

于 2013-04-03T03:58:52.303 回答
-1

尝试使用记事本++。它对许多脚本语言都很方便。这是下载链接Notepad++ 下载链接。它也是免费的。我们将其用于 javascript 编辑。它也适用于php

于 2013-04-03T04:19:36.783 回答