I have a string like: Chào Bạn
.
In PHP, I want to convert it to lowercase and remove all special character, whitespace.
Input: Chào Bạn
Output: chaoban
In php code:
$string = 'Chào Bạn';
$newString = preg_replace('/\s+/', '', $string);
echo strtolower($newString);
The result like $newString = chàobạn
.
I can't remove the special character.