No syntax highlighting
I have the full IntelliJ package but seeing as it includes PHPstorm I hope this forum is most relevant.
I've started messing around with PHP a bit but I don't get any syntax highlighting. I'm using the Darcula theme.
For instance:
<!DOCTYPE html>
<html>
<head>
<title>PHP Meuk</title>
</head>
<body>
<?php
echo "Hello World!";
$variableName = "MyName";
?>
</body>
</html>
Is all one color apart from the title "PHP Meuk"
I opened an HTML file in a new project and renamed it to a .php file.
I checked Settings | File Types (under IDE settings) and .php is listed under the HTML files.
Anyone any idea how I could solve this?
Thanks a lot in advance!
Does anyone have any idea how I can get syntax highlighting working?
Please sign in to leave a comment.
It must be a borked setting, seeing as it's mixing colors now :) the <?php opening tag is one color and the ?> closing one another.
Hi there,
If you look at the icon this file has, it tells that this file (or maybe even all php files) is associated with HTML file rather than PHP.
To "fix" it:
If unsure -- post screenshots of Settings | File Types -- for both "HTML files" as well as "PHP files"
Thank you so much for your quick answer. Fixed!