//matches the URL's
preg_match_all ("/([a-z0-9]|\-|\.)+@(([a-z0-9]|\-)+\.)+[a-z]{2,4}/","$htmls", $emails);
//counts the multi-dimentinal array
$total = count($emails[0]);
//converts to simple array
for ($i = 0; $i < $total; $i++){
$emails2[] = $emails[0][$i];
}
//prints em
for ($m = 0; $m < $total; $m++){
echo "<a href=$emails2[$m]>click here!</a><br>";
}
this is the way I know of. this will find all the URL's in a string, put them in an array, and spit it out.