I have problem with viewing Turkish characters, so I am trying to use str_replace function to replace that wierd symbols with Turkish character but I can't get there..
I have a form like:
- Code: Select all
<p><h3>*İlan Başlığı:</h3><input type="text" name="album_header" class="MustField" /></p>
<p><h3>*İsim:</h3><input type="text" name="album_name" class="MustField" /> </p>
<p><h3>*Şehir</h3><input type="text" name="album_place" class="MustField" /> </p>
<p><h3>*E-mail:</h3><input type="text" name="album_email" class="MustField" /></p>
<p><h3>Telefon:</h3><input type="text" name="album_tel" /></p>
<p><input type="submit" id="submit" value="İlanı Yayınla" /> </p>
And I am trying str_replace like:
- Code: Select all
if (isset($_POST['submit'])) {
$str = $album_header = $_POST['album_header'];
$album_name = $_POST['album_name'];
$album_place = $_POST['album_place'];
$album_email = $_POST['album_email'];
$album_tel = $_POST['album_tel'];
}
function tr2tr($str){
$str = str_replace("ı","ý",$str);
$str = str_replace("ş","Þ",$str);
$str = str_replace("ğ","ð",$str);
return $str;
}
I am not sure what I am doing here..But I still get wierd characters in stead of Turkish ones.
Can anyone help please?


