The first weapon you have against finding and solving errors is the PHP function error_reporting(). This allows you to pass in one of the error type constants just listed as error_reporting() 's only parameter, and force PHP to only output that kind of error. You can set this value in your php.ini file under error_reporting, but the error_reporting() function allows you to modify it at run-time.
You can use the bitwise operators to combine error types together in complicated ways, for example:
The first line will show only standard E_ERROR error messages, the second will show all error messages, the third will show all error messages (E_ERROR, E_CORE_ERROR, and E_COMPILE_ERROR), and the last line will show all error messages except notices. The last option is usually the default, however I recommend you use E_ALL by itself, and have PHP show notices - these are often gremlin bugs waiting to happen.
Author's Note: Try and program using E_ALL error messages, because that will make PHP show notices. Notices are there to tell you that you are not doing things ideally, and so often provide good hints and tips to make your PHP faster, safer, and less buggy.