kaberdey adlı üyeden alıntı:
mesajı görüntüle

for dönügüsyle olmadı ya da beceremedim. :S
16
●1.144

<?php
function degistir($yazi) {
$degistir = str_replace("Öğretmen", "Mu2", $yazi);
$degistir = str_replace("Muhallim", "Ö2", $degistir);
$degistir = str_replace("Ö2", "Öğretmen", $degistir);
$degistir2 = str_replace("Mu2", "Muhallim", $degistir);
echo $degistir2;
}
$yazi[] = "Kişi Öğretmen ve Muhallim olacak";
$yazi[] = "Kişi Öğretmen ve Muhallim olacak2";
$sayi = count($yazi);
for ($sayac = 0; $sayac<$sayi; $sayac++)
{
degistir($yazi[$sayac]);
}
?> function kelime_degistirt($content) {
$icerik2 = $content;
$ara = array("domates", "momates", "zomates");
$degis = array("komates", "yomates", "lomates");
for ($i=0; $i<count($ara); $i++){
$degistir = str_replace($ara[$i], "lololololololololo", $icerik2);
$degistir = str_replace($degis[$i], "bobobobobobobobo", $degistir);
$degistir = str_replace("bobobobobobobobo", $ara[$i], $degistir);
$degistir2 = str_replace("lololololololololo", $degis[$i], $degistir);
}
return $degistir2; 
