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 Link to comment https://forums.phpfreaks.com/topic/60439-advanced-form/ 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. Link to comment https://forums.phpfreaks.com/topic/60439-advanced-form/#findComment-300647 Share on other sites More sharing options...
ayok Posted July 17, 2007 Author Share Posted July 17, 2007 Wow.. so fast.. Thank you ayok Link to comment https://forums.phpfreaks.com/topic/60439-advanced-form/#findComment-300654 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.