как записать script, который заключает в себе все слово, если оно содержит ключевое слово? пример: ключевое слово "fun", строка - птица смешная, результат - птица * смешная *. я делаю следующее
$str = "my bird is funny";
$keyword = "fun";
$str = preg_replace("/($keyword)/i","<b>$1</b>",$str);
но это ключевое слово menshions. моя птица забава ny