I want to replace the list of warnings and errors with a simple error banner. I’m trying to check if this code produce errors and if so output a custom error
$sxml = simplexml_load_file($yurl)
I played around with the try catch block but I just can’t seem to get it right, any help will be appreciated.
Use
libxml_use_internal_errors()libxml_get_errors()returns an array oflibXMLErrorobjects.