ayok Posted July 17, 2007 Share Posted July 17, 2007 Hi there, I don't know how it's called, but I want to ask how to make a form which able us to make bold, quote, link or change font color by using [].. like in this forum. Thank you, ayok Quote Link to comment Share on other sites More sharing options...
lightningstrike Posted July 17, 2007 Share Posted July 17, 2007 In order to do that you would need to parse the text provided using replacing functions in order to convert the code into in html. For example to parse tags you could use. $string = str_replace("[b]","<b>",$string); $string = str_replace("[/b]","</b>",$string); by the way for more advanced replacements like for links and image tags which require regular expressions you should check out PHPfreaks regexp forum. Quote Link to comment Share on other sites More sharing options...
ayok Posted July 17, 2007 Author Share Posted July 17, 2007 Wow.. so fast.. Thank you ayok Quote Link to comment 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.