Sun, 5 May 2024


How to translate certain characters in a string to other specified characters?

By: Nathalie, NetArt Media
Sat, 8 August 2020

You may use the special PHP function strtr

<?php

$myText="rsédfà";

$newText=strtr($myText,"éà","ea");

echo $newText;

?>

will display:

rsedfa


Category: PHP Examples
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox