Is het possible to highlight PHP blocks in html files?
Hi,
I'm a new user with PHP Storm. I would like to know if it's possible to highlight PHP blocks in HTML files. I work with Zend Framework and the view files are written in a .phtml file. It would be very nice if it would be possible to highlight PHP blocks in those .phtml files.
I've searched in the settings of PHP Storm but without result.
Could anybody help me with this problem?
Thanks in advance!
Please sign in to leave a comment.
Hi Maarten,
Yes it is possible. Which version of PhpStorm do you use ? Below I'm refering to v2.
1) File | Settings | File Types --> make sure that *.pthml files are assigned to "PHP files" file type, not HTML.
2) File | Settings | Editor | Colors & Fonts | PHP --> PHP Code -- select background color
Please note that with such approach you will see this background everywhere where PHP code block is present (even in "pure" *.php files -- like Zend Framework files itself as such files start with <?php ). This can be annoying to some people. Solution (not the best one, but still) is to create another color scheme and quickly switch between them (View | Quick Switch Scheme) when required.
Hmmm, I'll give that one a try.
Thanks!!