PHP mb_convert_variables() Function Last Updated : 12 Apr, 2023 Comments Improve Suggest changes Like Article Like Report The mb_convert_variables() is an inbuilt function in PHP that transforms the character code into variables. Syntax: mb_convert_variables( $to_encoding, $from_encoding, $var, ...$vars ): string|falseParameters: This function accepts four parameters that are described below: $to_encoding: The characters encoding converted into the variable.$from_encoding: This parameter is specified with the string separated with a comma or as an array. The detect_order will be used if omitted.$vars: The variable or array of variables to be converted. This parameter is passed by reference. The String, Array, and Object are taken by this variable....$vars: This is an optional parameter. Additional variables are to be converted, and separated by commas.Return values: If the conversion is successful, it will return "true" otherwise it will return "false". If $vars is an array, the function returns an array of the converted variables. Example 1: The following code demonstrates the mb_convert_variables() function. PHP <?php $string = "Hello, world!"; mb_convert_variables('UTF-8', 'ASCII', $string); echo $string; ?> Output: Hello, world! Example 2: The following code demonstrates the mb_convert_variables() function. PHP <?php $array = array( "name" => "GeeksforGeeks", "email" => "[email protected]" ); mb_convert_variables('UTF-8', 'ISO-8859-1', $array); print_r($array); ?> Output: Array ( [name] => GeeksforGeeks [email] => [email protected] ) Reference: https://www.php.net/manual/en/function.mb-convert-variables.php Comment More infoAdvertise with us Next Article PHP mb_convert_variables() Function N neeraj3304 Follow Improve Article Tags : PHP PHP-function PHP-Multibyte-String Similar Reads PHP mb_convert_kana() Function The mb_convert_kana() is an inbuilt function in PHP that is used to convert text into full-width and half-width. Syntax:mb_convert_kana($string, $mode, $encoding) : stringParameters: This function accepts three parameters that are described below. $string: This is the string that we want to convert 2 min read PHP mb_convert_case() Function The mb_convert_case() function is an inbuilt function in PHP that is used to perform case folding on the string and converted it into the specified mode of string. Syntax: string mb_convert_case( string $string, int $mode, string $encoding = null ) Parameters: This function accepts three parameters 2 min read PHP | convert_cyr_string() Function The convert_cyr_string() function is a inbuilt function in PHP. The function is used to convert a string from one Cyrillic character-set to another. Here two arguments are used such as from and to and they are of single character which represent the source and destination of Cyrillic character sets. 2 min read PHP | var_export() Function The var_export() is a built-in function in PHP which is used to return the structured value(information) of a variable that is passed to this function as a parameter. This function is similar to the var_dump() function.Syntax: var_export($var, $return) Parameters: This function accepts two parameter 1 min read PHP mb_convert_encoding() Function The mb_convert_encoding() function is an inbuilt function in PHP that transforms the string into another character encoding. Syntax: mb_convert_encoding( array|string $string, string $to_encoding, array|string|null $from_encoding = null ): array|string|falseParameters: This function has 3 parameters 1 min read Like