Using PHP explode() to parse multi-part error messages
A couple of thoughts:


This function is designed to only deal with a very sepcific use case - parsing a formatted error string.  For that reason I would recommend changing the function name to be more representative of what is actually happening.  Perhaps something like parseErrorString() or similar.
Since you are dealing with a very specific use case here, why would you require the caller to pass in the delimiters?  This function should fully encapsulate all the parsing logic.
Using an array for return, seems odd, particularly since you have spaces in your key names.  I would consider returning a stdClass or similar object with type, message, detail properties.
Though not strictly required, I would consider using regular expressions here, as I think that can clean things up as well as allow the solution to be less fragile to changes in the string format.
Using PHP_EOL as line break may be fragile. PHP_EOL is good for working with strings within same environment, but may fail if your application is running in a different environment than the environment your string is produced in.
Your function assumes happy path execution.  What if you get a poorly/unexpectedly formatted string?  Perhaps you are validating this string somewhere else, but if not, you should do it here in your function.


A refactoring, with these thoughts in mind, might yield something like the following:

function parseErrorString($string) {
    if(empty($string) || !is_string($string)) {
        throw new InvalidArgumentException('Non-zero length string expected');
    }
    $lines = preg_split('/\R/', $string);
    $error = array_reduce(
        $lines,
        function (&amp;$err, $line) {
            $regex = '/^Error (Type|Message|Detail) - (.*)$/';
            $matches = [];
            $result = preg_match($regex, $line, $matches);
            if ($result !== 1) {
                // no match.  Is this an error condition?
                // at the very least, do nothing
                return $err;
            }
            $err-&gt;{strtolower($matches[1])} = $matches[2];
            return $err;
        },
        new stdClass();
    );
    return $error;
}