Hi; I have a bit strange problem. function replace_tr($text) { $text = trim($text); $search = array('Ç','ç','Ğ','ğ','ı','İ','Ö','ö','Ş','ş','Ü','ü',' '); $replace = array('C','c','G','g','i','I','O','o','S','s','U','u','-'); $new_text = str_replace($search,$replace,$text); return $new_text; } $string = 'Gürkan Arabacı'; $new_string = replace_tr($string); echo $new_string; Code (markup): is a basic php replace sample but i want to replace ’ character with ' chracter. Can anybody help me for this? Thanks for the comments
This will do it: $search = array('Ç','ç','G','g','i','I','Ö','ö','S','s','Ü','ü',' ','’'); $replace = array('C','c','G','g','i','I','O','o','S','s','U','u','-','\''); PHP: