public static function removeHeader(array $message, $header)
    {
        if (isset($message['headers'])) {
            foreach (array_keys($message['headers']) as $key) {
                if (!strcasecmp($header, $key)) {
                    unset($message['headers'][$key]);
                }
            }
        }

        return $message;
    }
public static function removeHeader(array $message, $header)
    {
        if (isset($message['headers'])) {
            foreach (array_keys($message['headers']) as $key) {
                if (!strcasecmp($header, $key)) {
                    unset($message['headers'][$key]);
                }
            }
        }

        return $message;
    }
public static function removeHeader ( array $ message , $ header ) { if ( isset ( $ message [ 'headers' ] ) ) { foreach ( array_keys ( $ message [ 'headers' ] ) as $ key ) { if ( ! strcasecmp ( $ header , $ key ) ) { unset ( $ message [ 'headers' ] [ $ key ] ) ; } } } return $ message ; }
Removes a header from a message using a case-insensitive comparison.

@param array  $message Message that contains 'headers'
@param string $header  Header to remove

@return array
Removes a header from a message using a case - insensitive comparison .