言語のアルファベットに使用します。これらの行を短く書きたいのですが... 長すぎます.. 短く書く方法はありますか?
<?php
$yazi="abcçdefgğhıijklmnoöprsştuüvyzABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ";
$yazi=preg_replace("/a/i","A",$yazi);
$yazi=preg_replace("/b/i","B",$yazi);
$yazi=preg_replace("/c/i","C",$yazi);
$yazi=preg_replace("/ç/i","C",$yazi);
$yazi=preg_replace("/Ç/i","C",$yazi);
$yazi=preg_replace("/d/i","D",$yazi);
$yazi=preg_replace("/e/i","E",$yazi);
$yazi=preg_replace("/f/i","F",$yazi);
$yazi=preg_replace("/g/i","G",$yazi);
$yazi=preg_replace("/ğ/i","G",$yazi);
$yazi=preg_replace("/Ğ/i","G",$yazi);
$yazi=preg_replace("/h/i","H",$yazi);
$yazi=preg_replace("/ı/i","I",$yazi);
$yazi=preg_replace("/i/i","I",$yazi);
$yazi=preg_replace("/İ/i","I",$yazi);
$yazi=preg_replace("/j/i","J",$yazi);
$yazi=preg_replace("/k/i","K",$yazi);
$yazi=preg_replace("/l/i","L",$yazi);
$yazi=preg_replace("/m/i","M",$yazi);
$yazi=preg_replace("/N/i","N",$yazi);
$yazi=preg_replace("/o/i","O",$yazi);
$yazi=preg_replace("/ö/i","O",$yazi);
$yazi=preg_replace("/Ö/i","O",$yazi);
$yazi=preg_replace("/p/i","P",$yazi);
$yazi=preg_replace("/r/i","R",$yazi);
$yazi=preg_replace("/s/i","S",$yazi);
$yazi=preg_replace("/ş/i","S",$yazi);
$yazi=preg_replace("/Ş/i","S",$yazi);
$yazi=preg_replace("/t/i","T",$yazi);
$yazi=preg_replace("/u/i","U",$yazi);
$yazi=preg_replace("/ü/i","U",$yazi);
$yazi=preg_replace("/Ü/i","U",$yazi);
$yazi=preg_replace("/v/i","V",$yazi);
$yazi=preg_replace("/y/i","Y",$yazi);
$yazi=preg_replace("/z/i","Z",$yazi);
echo $yazi;
?>
結果: ABCCDEFGGHIIJKLMNOOPRSSTUUVYZABCCDEFGGHIIJKLMNOOPRSSTUUVYZ