se ho capito bene

usa str_replace

$testo(variabile del testo inserito = str_replace("carattere", "modifica carattere", $testo);