This post will go over how to enable php code completion in HTML files in Netbeans IDE. To enable PHP code completion in HTML files you will first want to make sure that the version of Netbeans already supports PHP. There are about 6 or so versions of Netbeans and there are only two that support PHP. There is a PHP and the complete version. If you only have the JAVA or RAILS version you obviously aren’t going to have the proper files.
Once you are sure you have the proper version of Netbeans installed the next thing to do is check the MIME settings. Netbeans uses Mime settings to figure out how to what code completions to show you when you are working with a file. The mime settings are located in: “TOOLS-OPTIONS”
Click on “Miscellaneous – Files”. The File extension should be “html” and then you want to associated the file type to “PHP (text/x-php5)” as seen in the screenshot.
By making this selection you will have successfully enabled php code completion in HTML files in the Netbeans IDE.