Netbeans should auto-indent the code as you go assuming it understands the file type. I'm using Netbeans 6.5RC1 on OpenSolaris b105. You'll need Netbeans 6.5 if you want to use the integrated PHP support.
Make sure you have the PHP plugin installed and enabled. Tools -> Plugins -> (search for PHP) -> Select the "PHP - Scripting" plugin -> Install -> Restart Netbeans. Now you can go to File -> New Project -> Select "PHP" from 'Categories' -> Select the appropriate project type. Complete the rest of the wizard information. Import any files you need. Open and enjoy. You should get syntax highlighting and code completion. The same can be said when you create any HTML, js, etc files. If you want to change the indentation settings go to Tools ->Options -> Editor -> Formatting -> and customise how you like. If you want to change the syntax colours for PHP (or any language) go to Tools ->Options -> Fonts & Colors -> Syntax Tab -> Select PHP from the 'Language' drop-down and modify accordingly. The Netbeans PHP Project main page can be found here - http://www.netbeans.org/features/php/. There's a few web casts that are useful to get you going. Lots of useful documentation and community forums as well. Enjoy. -- This message posted from opensolaris.org