Why does this function not autolink?

\[code\] function twitterify($ret) { $ret = preg_replace("#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t< ]*)#", "\\1<a href=http://stackoverflow.com/"\\2\" target=\"_blank\">\\2</a>", $ret); $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", "\\1<a href=http://stackoverflow.com/"http://\\2\" target=\"_blank\">\\2</a>", $ret); $ret = preg_replace("/@(\w+)/", "<a href=http://stackoverflow.com/"http://www.twitter.com/\\1\" target=\"_blank\">@\\1</a>", $ret); $ret = preg_replace("/#(\w+)/", "<a href=http://stackoverflow.com/"http://search.twitter.com/search?q=\\1\" target=\"_blank\">#\\1</a>", $ret);return $ret;}\[/code\]I'm trying to get this function to autolink my links on my blog, \[code\]<?php autolink(@solomonaleh); ?>\[/code\]But I get a blank screen. Thank you.
 
Back
Top