Hi there, I'm getting this error:
Warning: preg_replace() [function.preg-replace]: Unknown modifier '<' in ....
for this code:
$pattern = '<title>title |';
$rep = '<title>title, '.date('F j, Y').' |';
$text = str_replace($pattern, $rep, $text);
# <h2>...
$pattern = '<h2></h2>';
$rep = '<h2>'.date('F j, Y').'</h2>';
$text = preg_replace($pattern, $rep, $text); // line the warning refers to
Do I need to escape these or something to get rid of the warning? any help would be great!