lalabored Posted July 31, 2009 Share Posted July 31, 2009 I want to be able to replace [user: someperson] with a link that goes to the someperson's profile but I have no idea where to start... Quote Link to comment https://forums.phpfreaks.com/topic/168271-solved-replacing-user-with-a-link/ Share on other sites More sharing options...
ignace Posted July 31, 2009 Share Posted July 31, 2009 preg_replace('/\[user:([\s-a-z]+)\]/', '<a href="profile.php?user=$1">$1</a>', $text); Quote Link to comment https://forums.phpfreaks.com/topic/168271-solved-replacing-user-with-a-link/#findComment-887534 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.