Edit PHP files as HTML

Answered

Hello,

I'm considering using PyCharm for both Python and HTML+JavaScript development so I downloaded the full demo.

When dealing with .py, .js, .html... files everything seems perfect, but I want also to edit some HTML files with the PHP extension. I know that you cannot use PyCharm for PHP development, but what I actually want is to edit HTML code. I don't care if it grays out the PHP code inserts, but I want to be able to have all Webstorm functionalities for the HTML code.

Is there a way to do something like "associate PHP files to HTML language"?

Thanks!

1
2 comments

The only thing that comes to mind is Preferences | Editor | File Types where you can add *.php file extension to HTML file type.
After that, PyCharm will treat your PHP files as HTML.

1
Avatar
Permanently deleted user

That worked for me! Thanks!

0

Please sign in to leave a comment.