mb_strtolower()has a second parameter to indicate the encoding. If this parameter is omitted, it uses the return value of mb_internal_encoding (). Try adding this parameter explicitly. If you are using UTF-8:
$name = mb_strtolower($name, "UTF-8");
If this does not help, make sure that the input of UTF-8 is 100% sure that all steps are in this path, and the output is UTF-8. It is possible that you are working with IS-8859-1 data that is being distorted by the strtolower operation.
source
share