There is a lot of data in the system that is a mix of uppercase and lowercase random strings. Now I want to convert them to lowercase in batches. What is the best way? There is a lot of data in the system that is a mix of uppercase and lowercase random strings. Now I want to convert them to lowercase in batches. What is the best way?
Reply content:
There is a lot of data in the system that is a mix of uppercase and lowercase random strings. Now I want to convert them to lowercase in batches. What is the best way?
Strtolower ()
In some environments, inputting strings with Chinese characters may cause problems. We recommend that you use the following alternative solution:
/*** Converts uppercase letters to lowercase letters (in some systems, strtolower has an error in converting strings containing Chinese characters) * @ param string $ string */public static function str_tolower ($ string) {return strtr ($ string, 'abcdefghijklmnopqrstuvwxy', 'abcdefghijklmnopqrstuvwxy ');}
Strtolower () function
Document