Misafir adlı üyeden alıntı: mesajı görüntüle
function replace_content($text) {
    if($text != "akbaba"){
        $replace = array('a' => 'aaa', 'b' => 'bbb', 'c' => 'ccc', );
        $text = str_replace(array_keys($replace), $replace, $text);
    }
    return $text;
}
veya
function replace_content($text) {
    if($text != "akbaba" && $text != "2.kelime"){
        $replace = array('a' => 'aaa', 'b' => 'bbb', 'c' => 'ccc', );
        $text = str_replace(array_keys($replace), $replace, $text);
    }
    return $text;
}
bunu kullanın
sonuç yine aynı akbaba kelimesinde ki a ve b harfleri yine replaceye uğruyor