PHP embedded in HTML in Eclipse

Asked

Viewed 223 times

3

Good morning:

I’m starting to use Eclipse Ide (Mars) because it already has PHP 7 support while Netbeans doesn’t have it yet.

I am facing a problem which is the non-formatting (syntax highlitgh) of PHP when embedded in HTML code.

In this case, I have an index.php file with HTML code and BODY has PHP code that Eclipse is not formatting or applying Highlight syntax on it (only in PHP code).

Someone knows how to fix this, I googled and found nothing on.

  • are you sure the code is formatted correctly? closed <?php ?> ?

  • 1

    Post the code there.

  • Place a screenshot.

  • 1

    You may need to install a code indentation and visualization theme or plugin, but first try this manually: http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.php.help%2Fhtml%2Ftasks%2Fformatting_code.html Use the command Ctrl + Shift + F http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.php.help%2Fhtml%2Freference%2Fpreferences%2Fcode_style_preferences%2Fformatter.html

  • 2

    To adjust the syntax:http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.php.help%2Fhtml%2Freference%2Fpreferences%2Feditor%2Fsyntax_coloring.html&cp=61_4_3_5_5

  • 2

    Ctrl + Shif + F worked! Thanks Ivan Ferrer

  • You solved the problem?

Show 2 more comments

1 answer

1

I couldn’t find an answer to the Eclipse problem but I found the solution for the Netbeans IDE: just install the version in development that already supports PHP7.

I was trying to use Eclipse because Netbeans didn’t have the support. With the support in the developing version of NB, I put the eclipse aside.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.