RufusJoy
RufusJoy

Reputation: 81

How can I enable PHP Syntax highlighting in Visual Studio Code?

I use MAMP (on windows) as a local web server and I just started to use Visual Studio Code. I set the php.exe path in the settings.json file trough "php.validate.executablePath". It seems work, or maybe it gives me no error, so I think it's working, but the PHP syntax highlighting doesn't work. All my variables are white colored and so the functions.

What could be the problem?

Thank you all.

EDIT: Ok, this was a theme problem and the highlighting started to work properly, but my "<?php ?>" tags inside the html code look the same color as other tags. Is there a way to fix it?

Upvotes: 8

Views: 10317

Answers (1)

SomeGenericDev
SomeGenericDev

Reputation: 641

Make sure you didn't forget your

<?php ... ?>

tags

Upvotes: 32

Related Questions