In general, it is not a good idea to display PHP errors in a web browser so potential hackers cannot gain information about your website coding.
However, when performing development or testing it may be useful to enable error display to the browser for troubleshooting purposes. To do this, add the following line at the beginning of the PHP script:
error_reporting(E_ALL);
Now, any errors that occur when the script is parsed will display in your browser.