I want to replace "hello"
with "guys"
except the image src and alt with PHP (case insensitive).
From
Hello hello HELLO <img src="hello.jpg" alt="hello" />
I want
Guys guys GUYS <img src="hello.jpg" alt="hello" />
or
guys guys guys <img src="hello.jpg" alt="hello" />
I tried with str_replace
, str_ireplace
, preg_replace
but no result.