View Single Post
Old February 9th, 2009, 5:05 PM   #6 (permalink)
fury
Surpass Fan
Super #1
 
fury's Avatar
 
Joined in Dec 2005
Lives in MN > USA
Hosted on pass84
2,140 posts
Gave thanks: 89
Thanked 112 times
Send a message via AIM to fury Send a message via Skype™ to fury
I think I did it on my own. I looked at how to use preg_replace, because I never have before..

PHP Code:
<?php

$pattern 
= array('/@([A-Za-z0-9]*)/');
$replace = array('@<a href="http://twitter.com/$1">$1</a>');
$subject "@mrheadrick i think i figured it out on my own!";

echo 
preg_replace($pattern$replace$subject1);
?>
__________________
fury™ - not helping the situation since 1987
robmonroe.net | Twitter | Foursquare
fury is offline   Reply With Quote