[PHP] plain text email address to hyperlink?
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}$","\\1",$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]
[PHP] Unusual error.
I wrote a small column script for a site a while back, it worked without a hitch. I moved this script over for another column to use, and it worked fine until someone edited a few of the files, then I kept getting this error. Warning: MySQL: Unable to save result set in /home/prowrest/public_html/ddt/sql.php on line 14 function query($query) { global $link,$db; $result = mysql_db_query($db,$query,$link); if (!$result) { return 0; } else { return $result; } } line 14 is $result = mysql_db_query... I've never encountered this, and it only happens when I change the table it's supposed to look into for the data. Using the old table, it's fine, The new table, it gives me the above error. Any suggestions? Robert Reed ([EMAIL PROTECTED]) WWW - http://www.theextreme.net --- "This body here reminds me of my own mortality." --- -- 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]