Email link to a variable!

A

Anonymous

Guest
<p><a href="mailto:parsxeal@hotmail.com">parsxeal@hotmail.com</a></p>

how can i make this html code in php, and transofrm it to mail to a variable?

$mail = "parsxeal@hotmail.com"
 
Code:
<?

$content="<p><a href=\"mailto:parsxeal@hotmail.com\">parsxeal@hotmail.com</a></p>";

preg_match('/<a href="mailto:([^<]*)">/', $content, $arr);

echo $arr[1];

?>
 
the email doesn't stay like a link!
it's supose to stay like a link.
 
I dont understand you what are you want to get
<p><a href="mailto:parsxeal@hotmail.com">parsxeal@hotmail.com</a></p>

This or this ?
 
this do the work!
thanks anyway :)

$mail="parxal@hotmail.com";
print "<p><a href='mailto:".$mail."'>".$mail."</a></p>";
 
Back
Top