I am trying to figure how to use this on case sensitive words where the case is kept the same just the latters changed.
For example
$line = preg_replace("/(h)ello/i","\1owdy", $line);
this will change these 3
hello - howdy
Hello - Howdy
HELLO - Howdy
How can I make it so the HELLO turns to HOWDY
and also what if the replacing letter is not the same
How would I do for example
$line = preg_replace("/(h)ello/i","G'day", $line);
Confused...
Thanks,
Jeff