или так
public static function antirek($str)
{
$kod = array(
'sayt.ru', 'sayt.uz'
);
foreach ($kod as $word) {
$str = preg_replace("/".$word."/iu", "", $str);
$result = strip_tags($str);
}
return $result;
}и проверку
или так
public static function antirek($str)
{
$kod = array(
'sayt.ru', 'sayt.uz'
);
foreach ($kod as $word) {
$str = preg_replace("/".$word."/iu", "", $str);
$result = strip_tags($str);
}
return $result;
}