If there are no links already embedded (as html), the code Chris posted should work nicely. I needed to avoid valid HTML while transforming visible links, so this is what I'm using.
// function to transform links and emails into clickable html
function makelinks($input)
{
// first get http:// and etc
$input = eregi_replace("[\"](http://[[:alnum:]#?/&=.,]*)",
" <a href=\"\1\">\1</a>",
$input);
// and at the beginning of a line
$input = eregi_replace("([a-z]://[[:alnum:]#?/&=.,])",
" <a href=\"\1\">\1</a>",
$input);
// then get the email@hosts
$input = eregi_replace("(([a-z0-9_]|\-|\.)+@([[:space:]]*)([[:alnum:]-]))",
"<a href=\"mailto:\1\">\1</a>", $input);
return($input);
}