Why in Netbeans html code don't have indentation in php script after formatting
When I'm writing html code in php script, the html code is align to left and dont get indentation/tabs.
here's example:
<? foreach($cats as $key => $cat) : ?>
<div class="navbtn">
&l开发者_Go百科t;a href="cat/<?=$cat['id']?>"><?=$cat['name']?></a>
</div>
<? endforeach; ?>
*I'm using Netbeans 6.8
If the code formatter would intend HTML, it would actually alter the output of the script. One might think that whitespace in HTML has no effect, but for some rare cases it has, e.g. inside pre or textarea tags. I guess the PHP code formatter in Netbeans is just not smart enough and thus better ignores HTML completely.
精彩评论