Urmila Samariya has Published 135 Articles

PHP – mb_preferred_mime_name() function

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 13:26:57

102 Views

The mb_preferred_mime_name() function in PHP is used to return the MIME string for the character encoding and it returns the charset string. It gets a MIME (Multipurpose Internet Mail Extensions) charset string for the specific encoding.Syntaxstring mb_preferred_mime_name($string_encoding)Parametersmb_preferred_mime_name() accepts only one parameter −$string_encoding − This parameter is used to check the ... Read More

PHP – Parse the GET, POST, and COOKIE data using mb_parse_str()

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 13:25:16

640 Views

The mb_parse_str() function in PHP is used to parse the GET, POST, and COOKIE data and it sets the global variable. It parses the URL encoded data and detects the encoding. After that, it converts the coding in the internal encoding and sets values for the global variables. This function ... Read More

PHP – How to get the Unicode point value of a given character?

Urmila Samariya

Urmila Samariya

Updated on 11-Oct-2021 13:22:14

2K+ Views

In PHP, we can use the mb_ord() function to get the Unicode code point value of a given character. This function is supported in PHP 7 or higher versions. The mb_ord() function complements the mc_chr() function.Syntaxint mb_ord($str_string, $str_encoding)Parametersmb_ord() accepts the following two parameters −$str_string − This parameter is used for ... Read More

PHP – Return an array of all supported encodings with mb_list_encodings()

Urmila Samariya

Urmila Samariya

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

312 Views

The mb_list_encodings() function in PHP is used to return an array of all supported encodings. This function is supported in PHP 5 or higher version.Syntaxarray mb_list_encodings()Parametersmb_list_encodings() takes no parameters.Return ValuesThis function returns a numerically indexed array.Errors/Exceptionsmb_list_encodings() does not produce any errors.Examplemb_list_encodings() does not produce any errors.OutputIt will produce the following ... Read More

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

372 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

585 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

151 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

226 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

698 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

174 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

Advertisements