Urmila Samariya has Published 145 Articles

PHP – Get or set the HTTP output character encoding with mb_http_output()

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 13:11:03

262 Views

The mb_http_output() function in PHP is used to get or set the HTTP output character encoding. An output, after this function is called, will be converted from the set internal encoding to the specified encoding.Syntaxstring|bool mb_http_output(str $encoding = null)Parametersmb_http_output() accepts only a single parameter −$encoding − It is used to ... Read More

PHP – Detect HTTP input character encoding with mb_http_input()

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 13:08:36

412 Views

The mb_http_input() function in PHP is used to detect the HTTP (Hyper-text transfer protocols) input character encoding. This function is supported in PHP 5.4 or higher version.Syntaxarray|string mb_http_input(str $type=null)Parametersmb_http_input() accepts only a single parameter −$type − In the type parameter, the input string specifies the input type, like −G is ... Read More

PHP – Get the internal settings of mbstring with mb_get_info()

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 13:06:33

89 Views

The mb_get_info() function in PHP is used to get the internal settings of mbstring. This function is supported in PHP 5.4 or higher version.Syntaxarray|string|int mb_get_info(str $type = "all")ParametersIt accepts only a single parameter to get the multibyte information.$type − If the type parameter is not specified or it is specified ... Read More

PHP – mb_eregi_replace() function

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 13:02:17

131 Views

In PHP, mb_eregi_replace() is used to replace a regular expression with a multibyte support, ignoring case. This function will scan the string for matches to the pattern, then it will replace the matched text with the replacement. This function is supported in PHP 4.2 or higher version.Syntaxstring mb_eregi_replace(str $pattern, str ... Read More

PHP – mb_ereg_replace() function – Replace regular expression with multibyte support

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 12:58:56

548 Views

In PHP, mb_ereg_replace() is used to replace a regular expression with a multibyte support. It scans the string for matches to pattern, then it replaces the matched text with the replacement.Syntaxstring mb_ereg_replace(str $pattern, $str $replacement, str $string, str $options)ParametersThe function accepts the following four parameters −$pattern − This parameter is ... Read More

PHP – mb_ereg_replac_callback() function

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 12:56:47

109 Views

In PHP, mb_ereg_replace_callback() function is used to perform a regular expression search and replace it with a multibyte support using a callback. It will scan the strings and match them with a pattern, then it will replace the matched text with the output of the callback function. This function is ... Read More

PHP – Match regular expression using mb_ereg_match()

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 12:53:09

344 Views

In PHP, mb_ereg_match() function is used for matching a given string with a regular expression pattern. This function only matches the string from the beginning of the string and it is not necessary that it will match the string till the end. This function will return true or 1 if ... Read More

PHP – Get aliases of a known encoding type using mb_encoding_aliases()

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 12:49:47

106 Views

In PHP, mb_encoding_aliases() is used to get the aliases of a known encoding type. This function is supported in PHP 5 or higher version.Syntaxarray mb_encoding_aliases(str $encoding)ParametersIt accepts only one parameter, $encoding, which is the encoding type checked for aliases.Return ValuesIt returns a numerically indexed array of encoding aliases on success ... Read More

PHP – Encode string for MIME header using mb_encode_mimeheader()

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 12:43:16

359 Views

In PHP, mb_encode_mimeheader() function is used to encode a string for MIME (Multipurpose Internet Mail Extensions) header. It encodes a given string by the MIME header encoding scheme.Syntaxstring mb_encode_mimeheader(str $string, str $charset, str $transfer_encoding, str $newLine, int $indent)ParametersThe mb_encode_mimeheader() function accepts five parameters −$string − This parameter is used to ... Read More

PHP – How to detect character encoding using mb_detect_encoding()

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 12:19:32

6K+ Views

In PHP, mb_detect_encoding() is used to detect the character encoding. It can detect the character encoding for a string from an ordered list of candidates. This function is supported in PHP 4.0.6 or higher version.mb_detect_encoding() is useful with multibyte encoding, where not all sequences of bytes form a valid string. ... Read More

Previous 1 ... 3 4 5 6 7 ... 15 Next
Advertisements