hi guys i'm pulling up email addresses from a mysql database, when i get the email adresses on the page i would like to have them appear as mailto's. I have tried several peices of code such as
Users Email:<mailto:"<?php echo "$email" ?>"
&
<?php echoUsers Email:<mailto:?> <?php echo "$email" ?><?php echo>
i found this on the net from alt-php-faq.net. Its a function that transforms all linkable elements to links :
<?php
// Written by Fredrik Kristiansen (russlndr at online.no)
// and Albrecht Guenther (ag at phprojekt.de).
function html_activate_links($str) {
$str = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\1" target="_blank">\\1</a>', $str);
$str = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a href="http://\\2" target="_blank">\\2</a>', $str);
$str = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})','<a href=\"mailto:\\1\">\\1</a>', $str);
return $str;
}
?>
but none work, would someone be able to help out? Thanks