I'm trying to replace a string with the beginning part of a url such as:
Replace: word
With: http://www.asite.com/adirectory
I've tried this many way...with no success yet:
Code: Select all
$xyz = preg_replace("word", "http://www.asite.com/adirectory", $aStringReadIn);
also tried:
$xyz = preg_replace("/word/", "http://www.asite.com/adirectory", $aStringReadIn);
and:
$xyz = preg_replace("word", "'http://www.asite.com/adirectory'", $aStringReadIn);Warning: Delimiter must not be alphanumeric or backslash
What do I need to do to fix this?
Thanks,
rxsid