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... 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); 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
Archived
This topic is now archived and is closed to further replies.