alfone Posted November 22, 2006 Share Posted November 22, 2006 NOTE: Square brackets [,] have been replaced with curly brackets {,} so that the forum does not parse my post.I'm writing a barbones forum in PHP, and am having trouble figuring out how to parse the links from the user generated {url=http://www.domain.com}domain.com{/url} to the proper HTML of < a href="http://www.domain.com/" >domain.com< /a >.The other stuff, {b}{i}{u} is easy, 'cause you can just run str_replace to switch out the user entered tags, to the html... but with the link, the domain is a wildcard and i need to grab it from between the "{url=" and the "}".Does anybody know how to chnage {url=http://www.domain.com}domain.com{/url} to < a href="http://www.domain.com" >domain.com< /a > with a simple string function?Thanks in advance for the help. Link to comment https://forums.phpfreaks.com/topic/28171-writing-a-forum-parsing-links/ Share on other sites More sharing options...
trq Posted November 22, 2006 Share Posted November 22, 2006 Take a look at [url=http://www.isolated-designs.net/stuff/function_bbcode.phps]this[/url] bbcode function. Link to comment https://forums.phpfreaks.com/topic/28171-writing-a-forum-parsing-links/#findComment-128868 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.