ByBossX adlı üyeden alıntı: mesajı görüntüle
hocam tam olarak nasıl yapabilirim beceremedim.
Arkadaşın verdiği fonksiyonu koduna yerleştirdim ve bazı değişiklikler yaptım.
Bu kod ile çevirisen
Ş=>S , Ö=>O , Ç=>C , ş=>s , ö=>o , ç=>c
şeklinde çeviricektir.

<?PHP
function yazi($text){
$gelen = array("Ş" ,"Ö" ,"Ç","ş","ö","ç");
$yeni = array("S" ,"O","C","s" ,"o","c");
$son = str_replace($gelen , $yeni , $text);
return $son;
}

if (!empty($_POST["metin"]))
{



echo  '<b>Sonuc: <br><font color="red">' . yazi($_POST["metin"]) . '</font></b>';

Echo '
<html><body><br>
<form action="index.php" method="post">
<table align="center"><tr><td>Metin
<textarea name="metin" rows="20" cols="40">' . $_POST["metin"] . '</textarea></td><td>Bul
<p align="center"><input type="submit" value="Donustur" />
<br>
</p>
</form>';

    } else {

Echo '
<html><body><br>
<form action="index.php" method="post">
<p align="center"><input type="submit" value="Donustur" />
<table align="center"><tr><td>Metin
<textarea name="metin" rows="20" cols="40"></textarea></td>

<br>
</p></table>
</form>';

}
;
?>

Eğer aşağıdaki kod ile çevirisen durum değişir
Ş=>s , Ö=>o , Ç=>c
şeklinde çeviricektir.

<?PHP
function yazi($text){
$gelen = array("Ş" ,"Ö" ,"Ç");
$yeni = array("s" ,"o","c");
$son = str_replace($gelen , $yeni , $text);
return $son;
}

if (!empty($_POST["metin"]))
{



echo  '<b>Sonuc: <br><font color="red">' . yazi($_POST["metin"]) . '</font></b>';

Echo '
<html><body><br>
<form action="index.php" method="post">
<table align="center"><tr><td>Metin
<textarea name="metin" rows="20" cols="40">' . $_POST["metin"] . '</textarea></td><td>Bul
<p align="center"><input type="submit" value="Donustur" />
<br>
</p>
</form>';

    } else {

Echo '
<html><body><br>
<form action="index.php" method="post">
<p align="center"><input type="submit" value="Donustur" />
<table align="center"><tr><td>Metin
<textarea name="metin" rows="20" cols="40"></textarea></td>

<br>
</p></table>
</form>';

}
;
?>
Yukarıdakilerden birini index.php diye kayd et.
İyi günler.