So I've got a script that basically takes input from a text area and I want to find a specific word in the variable (in the string) and replace it with another.
So far I've been getting all sorts of errors.
I want to for example find **contact and replace it with **/page/contact etc.
I'll keep trying and edit in the errors that I get here. I've no idea what I'm doing wrong.
edit 1
I'm getting
Warning: preg_replace() [function.preg-replace]: Unknown modifier 'a' in /path/.../.../*.php on line 57
When using
$string = preg_replace("**example", "**/page/example", $string);
str_replace?preg_replacehere. You are not using a regex. Just usestr_replace.