trying to replace string once and getting this error would appreciate any help.
$link = '<a href="'.$url.'" title="'.$anchor.'">'.$anchor.'</a> ';
$text = preg_replace(/" ".$anchor." "/,"", $text,1);
Getting this error message:
Error[2]: preg_replace(): Delimiter must not be alphanumeric or backslash
Any idea? All I want is just to replace the first occurrence of text with a link
The regular expression segment for these must be a string or an array of strings.