I've attempted to use the following snippet to convert an email address
in plain text to a hyperlink, and while it works fine in a function to
verify an email address, it doesn't seem to work to replace all occurances
of an email address within a body of text.
$page =
eregi_replace("^[0-9a-z]+([-_./]([0-9a-z]+))*@[0-9a-z]+([-.]([0-9a-z]+))*\\.
[a-z]{2,4}$","<a href=\"\\1\">\\1</a>",$pageOne);
echo $page;
$pageOne is the body of text that has the email address(es) in it. Is there
a better way of doing this, or would I have to bend and use an array to scan
each word for an email address and then convert them from there?
Thanks in advance,
Robert Reed ([EMAIL PROTECTED])
--------------------------------------
WWW -> http://www.theextreme.net
--------------------------------------
"I'd rather not even be than a man
that's staring in a mirror through me."
--------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]