Image names in the '?' I can not change the character with the PHP rename function. str_replace function did not work either.
What is the solution?
I used functions;
function replace($title){
$text = trim($title);
$search = array('Ç','ç','Ğ','ğ','ı','İ','Ö','ö','Ş','ş','Ü','ü',' ','%','?');
$replace = array('c','c','g','g','i','i','o','o','s','s','u','u','_','_','-');
$new_text = str_replace($search,$replace,$text);
$value = preg_replace("@[^A-Za-z0-9-_]+@i","",$new_text);
return $value;
}
I tried the iconv function, but it was illegal character error.
Your function working correctly, when i call your function like this
echo replace("MaÇsoÖ");