Answer the question
In order to leave comments, you need to log in
Netbeans PHP + HTML code formatting?
Netbeans has a great code formatting feature, the command is here: Source -> Format (ALT+SHIFT+F)
This formats code nicely (HTML, PHP, CSS, JS...), but not in case of multi-language (PHP +HTML) code - in this case, most often formatting does not give a good result .
Is there an adequate solution to this problem?
Code example: yadi.sk/d/e_MFK2aT3QBZAB
Answer the question
In order to leave comments, you need to log in
So, to answer my own question:
Netbeans' mixed (PHP+HTML) code formatting only works well when the start/end tag (i.e. "<?" or "?>") is on a line of its own.
Example:
code that will not be properly formatted:
<?if($res == "new") {?>
<!-- HTML или смешанный код -->
<?}?>
<?
if($res == "new") {
?>
<!-- HTML или смешанный код -->
<?
}
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question