开发者

syntax highlighting of multiline php echo statement in notepad++

开发者 https://www.devze.com 2023-04-13 09:35 出处:网络
I\'m sure this has been answered before, but i\'m tired of searching and don\'t want to start downloading editors a开发者_运维技巧nd IDEs without knowing what i\'m getting into.

I'm sure this has been answered before, but i'm tired of searching and don't want to start downloading editors a开发者_运维技巧nd IDEs without knowing what i'm getting into.

I am just getting started writing php, and i would like to know a way to have notepad++ (or another editor, IDE if necessary) highlight the syntax of a multiline echo statement containing html. I would like to highlight the html inside of the echo.


In Norepad++, NetBeans and other IDEs that I am familiar with there is no way to make the editor highlight html inside echo if your file is recognized by the editor as a PHP file. But you can print html outside of echo statements instead so that html is highlited and use echo only to output php variables inside html. For example:

<?php

 $name = 'John';
?>

<b>My name is <?php echo $name;?></b>
0

精彩评论

暂无评论...
验证码 换一张
取 消