PHP mb_convert_case() Function Last Updated : 02 Sep, 2022 Comments Improve Suggest changes Like Article Like Report 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 that are described below: $string: This parameter defines the string that needs to convert into a specified mode.$mode: This parameter holds the mode of conversion. The mode of conversion can be:MB_CASE_UPPERMB_CASE_LOWERMB_CASE_TITLEMB_CASE_FOLDMB_CASE_UPPER_SIMPLEMB_CASE_LOWER_SIMPLEMB_CASE_TITLE_SIMPLEMB_CASE_FOLD_SIMPLE$encoding: This parameter describes the character encoding. If this parameter value is omitted or null, the internal character encoding value will be used. Return Value: This parameter returns the case folded version of the string converted into the specified mode. Example 1: The following code demonstrates the PHP mb_convert_case() function. PHP <?php // Declare a string $str = "welcome to geeksforgeeks"; // Convert given string into upper // case using "UTF-8" encoding $upperCase = mb_convert_case( $str, MB_CASE_UPPER, "UTF-8"); // Print upper case string echo $upperCase; // Convert string into lower case // using "UTF-8" encoding $lowerCase = mb_convert_case( $upperCase, MB_CASE_LOWER, "UTF-8"); // Print lower case string echo "\n" . $lowerCase; ?> OutputWELCOME TO GEEKSFORGEEKS welcome to geeksforgeeks Example 2: The following code demonstrates another example of the PHP mb_convert_case() function. PHP <?php // Declare a string $str = "welcome to geeksforgeeks"; // Convert given string into case // title using "UTF-8" encoding $upperCase = mb_convert_case( $str, MB_CASE_TITLE, "UTF-8"); // Print upper case string echo $upperCase; // Convert string into case upper // simple using "UTF-8" encoding $lowerCase = mb_convert_case( $upperCase, MB_CASE_UPPER_SIMPLE, "UTF-8"); // Print lower case string echo "\n" . $lowerCase; ?> OutputWelcome To Geeksforgeeks WELCOME TO GEEKSFORGEEKS Reference: https://www.php.net/manual/en/function.mb-convert-case.php Comment More infoAdvertise with us Next Article PHP mb_convert_case() Function V vkash8574 Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Multibyte-String Similar Reads PHP base_convert( ) Math Function The base_convert() function in PHP is used to convert a number given in an arbitrary base to a desired base. Both the base should be between 2 and 32 and bases with digits greater than 10 are represented with letters a-z i.e 10 is represented as a, 11 is represented as b and 35 is represented as z. 2 min read 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_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 PHP mb_convert_variables() Function 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 characte 1 min read PHP mb_eregi() Function The mb_eregi() function is an inbuilt function in PHP that performs case-insensitive regular expression matches on a string having multibyte support. If the string pattern is matched, then it will return the string otherwise it will return false. Syntax: mb_eregi( string $pattern, string $string, ar 2 min read Like