PHP Styling on Files with Non-PHP Extension

  • Hi,

    For some reason, for the past 10 years my company has used php code in files that have .htm extension rather than the traditional .php extension.

    I can’t change the extensions to .php of several hundred files, but really would like to have the php styling (auto-indent, etc) while working on the php code in these files. The variable, command, etc colors and tab levels are displayed. But lines are not auto-indented.

    To further explain, a file named helloworld.htm might have
    if ($i) {
    echo “hello”

    Thank you for your help.


  • @JoeBoxer35

    Maybe I am missing some important point, but can’t you just go to the Language menu and select PHP?

  • Alan,

    Thank you, I didn’t realize it was that easy. I saw the language menu and looked in “P” but that only had Pascal, Perl, etc. I didn’t see PHP at the bottom of that list.

    Thank you for helping me out so quickly !!! Much appreciated.


Log in to reply