Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $screen_name = "Test";
- $mention = "@".$mention;
- $mention_link = "<a href='#'>".$screen_name.'</a>';
- $tweet = "This is a @Test tweet";
- $tweet = preg_replace('/(?<!\w)@test/m', $mention_link, $tweet);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement