what's wrong with this:
$text = preg_replace("[a-zA-Z0-9-]+@[.a-zA-Z0-9-]+.[._a-zA-Z0-9-]", "<a href=\"mailto:$1">$1</a>", $text);
im trying to get the script to replace any emails typed in $text with a mail url.
i get this error when executing the script:
"Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/chris/public_html/six/tests/replaceurls.php on line 11
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/chris/public_html/six/tests/replaceurls.php on line 11"
the script i typed is in line 11.
someone help plz!