22
I'm just trying to make fixed the $str to 5 characters, but couldn't.
$str = "nü";
echo str_pad($str, 5, "ü"); // give nüü
I know that's an unicode issue and searched a lot but no luck. I unsuccessfully tried somethings such as this:
echo str_pad($str, 4 + mb_strlen($s), $s);
echo str_pad($str, 5 + mb_strlen($s), $s);