Next: Contributors, Previous: Customization, Up: Top
The PHP programming language is commonly embedded with HTML but also with other markup formats. Unfortunately, PHP mode is currently unable to recognize these other bits and provide commands that behave appropriately. Other Emacs modes for properly indenting HTML include HTML mode, SGML mode and XML mode.
For example, when editing the HTML sections found in a PHP file, consider turning on HTML mode with M-x html-mode. Use the the mode-specific commands for manipulating the HTML. When finished, turn back on PHP mode with M-x php-mode to return working on the PHP sections of the file.
Alternatively, consider using a multiple major mode like mumamo, mmm-mode or multi-mode. These modes allow a single buffer to appoint different major modes to respective portions of the buffer.