/ Published in: PHP
                    
                                        
linkify twitter text status
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
function linkify_twitter_status($status_text)
{
// linkify URLs
'/(https?:\/\/\S+)/',
'<a href="\1">\1</a>',
$status_text
);
// linkify twitter users
'/(^|\s)@(\w+)/',
'\1@<a href="http://twitter.com/\2">\2</a>',
$status_text
);
// linkify tags
'/(^|\s)#(\w+)/',
'\1#<a href="http://search.twitter.com/search?q=%23\2">\2</a>',
$status_text
);
return $status_text;
}
URL: http://davidwalsh.name/linkify-twitter-feed
Comments
 Subscribe to comments
                    Subscribe to comments
                
                