0

I am able to replace special characters, however when it happens it replaces them with "?". I basically want to replace the ä in this example with an underscore.

UPDATE: I do not want to replace all ä's, I only want to replace the first ä

$answer = "päivä";
$answer = substr_replace($answer, '_', 2, 1);
echo $answer;

Output: p�_ivä

Thanks :)

0 Answers0