Hi wizkid,
I have tried your code. Still it doesn't its making me mad....can you please check the following code.
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
$str="
Mr. John Doe
president@rahul.org
Kathy
Administrative Assistant
adminassistant@rahul.org
Holly
Finance & Operations Director
financedirector@rahul.org
Myrna
Finance & Operations Assistant
financeassistant@rahul.org
";
function makeClickable($text) {
// Modified by Nathan Codding - July 20, 2000.
// Made it only work on URLs and e-mail addresses preceeded by a space, in order to stop
// mangling HTML code.
// The Following function was taken from the Scriplets area of [url]http://www.phpwizard.net,[/url] and was written by Tobias Ratschiller.
// Visit phpwizard.net today, its an excellent site!
// original make_clickable
$ret = eregi_replace(" ([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", " <a href='\\1://\\2\\3' target='_blank' target='_new'>\\1://\\2\\3</a>", $text);
$ret = eregi_replace(" (([a-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))", " <a href='mailto:\\1' target='_new'>\\1</a>", $ret);
return $ret;
}
echo(makeClickable($str)."<br><br>");
?>
</body>
</html>
Thansk for help.
Rahul