Code Snippet
Automatic Mailto Links
$string = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})','<a href="mailto:\\1">\\1</a>', $text);
echo $string;
$string = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})','<a href="mailto:\\1">\\1</a>', $text);
echo $string;
Keep in mind that the POSIX Regex functions are deprecated in PHP 5.3.0 and removed in PHP 6.
See http://us2.php.net/manual/en/function.eregi-replace.php
AndiD is right. Use preg_* functions instead of eregi_* functions.
what does this do though? im thinking about making a mail:to link on the footer of my site :
http://attilahajzer.host-ed.net/
take a look and see if it’d be worth it.
DigWP
A book and blog co-authored by Jeff Starr and myself about the World's most popular publishing platform.
Quotes on Design
Design, like Art, can be an elusive word to define and an awfully fun thing to have opinions about.
HTML-Ipsum
One-click copy to clipboard access to Lorem Ipsum text that comes wrapped in a variety of HTML.
Bookshelf
Hey Chris, what books do you recommend? These, young fertile mind, these.