PHP mb_decode_mimeheader() Function Last Updated : 28 Mar, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The mb_decode_mimeheader() function is an inbuilt function in PHP where the string is decoded into the MIME header field. Syntax: mb_decode_mimeheader(string $string): string Parameter: This function has a single parameter: string: This parameter specifies the string that is to be decoded. Return Value: The decoded string will be returned in internal character encoding. Example 1: The following code demonstrates the mb_decode_mimeheader() function PHP <?php // MIME-encoded header string $header_string = "=?ISO-8859-1?Q?Caf=E9_au_lait?="; // Decode the header string $decoded_string = mb_decode_mimeheader($header_string); // Output the decoded string echo $decoded_string; ?> Output: Café_au_lait Example 2: The following code demonstrates the mb_decode_mimeheader() function PHP <?php // Array of MIME-encoded header strings $headers = [ "=?ISO-8859-1?Q?Caf=E9_au_lait?=", "=?ISO-8859-1?Q?Bj=F6rk?=", "=?ISO-8859-1?Q?M=F6tley_Cr=FCe?=", ]; // Decode the header strings mb_convert_variables("UTF-8", "ISO-8859-1", $headers); array_walk($headers, function (&$value) { $value = mb_decode_mimeheader($value); }); // Output the decoded strings var_dump($headers); ?> Output: array(3) { [0]=> string(13) "Café_au_lait" [1]=> string(6) "Björk" [2]=> string(13) "Mötley_Crüe" } Reference: https://www.php.net/manual/en/function.mb-decode-mimeheader.php Comment More infoAdvertise with us Next Article PHP | header() Function N neeraj3304 Follow Improve Article Tags : PHP PHP-function PHP-Multibyte-String Similar Reads PHP mb_decode_numericentity() Function The mb_decode_numericentity() is an inbuilt function in PHP, where the reference for the numeric string in HTML will be decoded into characters. Syntax: mb_decode_numericentity(string $string, array $map, ?string $encoding = null): stringParameters: This function has four parameters: $string: This p 1 min read PHP | header() Function The header() function is an inbuilt function in PHP which is used to send a raw HTTP header. The HTTP functions are those functions which manipulate information sent to the client or browser by the Web server, before any other output has been sent. The PHP header() function send a HTTP header to a c 3 min read PHP htmlspecialchars_decode() Function The htmlspecialchars_decode() function is an inbuilt function in PHP that converts special entities back to characters. Syntax: Sttring htmlspecialchars_decode( string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ) Parameters: This function accept two parameters that are discussed 1 min read PHP mb_encode_numericentity() Function The mb_encode_numercentity() function is an inbuilt function in PHP that is used to encode HTML entities with numerical values encoded using either decimal or hexadecimal representation. Syntax: string mb_encode_numericentity( string $string, array $map, string $encoding, bool $hex )Parameters: This 2 min read PHP mb_encode_numericentity() Function The mb_encode_numericentity() function is an inbuilt function in PHP that is used to convert characters in a given string to their corresponding HTML numeric entity representations. Syntaxmb_encode_numericentity( string $string, array $map, ?string $encoding = null, bool $hex = false ): stringParame 2 min read PHP | mime_content_type() function The mime_content_type() function is an inbuilt function in PHP which is used to get the MIME content-type of a file. Syntax: string mime_content_type( $file ) Parameters: This function accepts single parameter $file which specifies the path of the file which MIME details to be find. Return Value: Th 1 min read Like