How can I list errors underneath a header in PHP?

Alex

New member
I created a error handler function. Here is the code for the error handler.
--------------------------------------------------------------------------------------------------
// Error handler
function errorHandler($errno, $errstr)
{
echo "<h1> Oops Something Went Wrong </h1>";
echo "<p> Error Number: $errno </p>";
echo "<p> Error Message: $errstr</p>";

}
set_error_handler("errorHandler"); //setting the error handler
------------------------------------------------------------------------------------------------
The thing is I dont want this whole thing getting repeated. I would like it just to have the header then list each error underneath the header.

How can I do this?
 
Back
Top