bosniamaj Posted August 28, 2006 Share Posted August 28, 2006 I have similiar problem to this:http://www.phpfreaks.com/forums/index.php/topic,105904.0.htmlBut I want to make smothing like this:[ quote=someone][ quote=someoneelse][ quote=me]hi there[/quote]hi to you too[/quote]hi all[/quote]to be like this:[quote]someone says:[quote]someoneelse says:[quote]me say:hi there[/quote]hi to you too[/quote]hi all[/quote]I will use this for quote:[code]<div style='border: 1px solid #cccccc; margin: 5px 4px; padding: 2px; background-color: #e9e9e9; font-size: 11px;'>\\1 says: <br>\\2</div>[/code] Link to comment https://forums.phpfreaks.com/topic/18889-bbcode-help/ Share on other sites More sharing options...
wildteen88 Posted August 28, 2006 Share Posted August 28, 2006 Use the following as the reqaluar expression:[code]|\[quote=(.*)\](.*)\[/quote\]\]|is[/code] Link to comment https://forums.phpfreaks.com/topic/18889-bbcode-help/#findComment-81672 Share on other sites More sharing options...
bosniamaj Posted August 28, 2006 Author Share Posted August 28, 2006 Can you please write the code?I really can't do this. I tried many ways, but nothing :( Link to comment https://forums.phpfreaks.com/topic/18889-bbcode-help/#findComment-81772 Share on other sites More sharing options...
wildteen88 Posted August 29, 2006 Share Posted August 29, 2006 [code=php:0]$yourvar = preg_replace("|\[quote=(.*)\](.*)\[/quote\]\]|is","<div style='border: 1px solid #cccccc; margin: 5px 4px; padding: 2px; background-color: #e9e9e9; font-size: 11px;'>\\1 says: <br>\\2</div>",$yourvar);[/code] Link to comment https://forums.phpfreaks.com/topic/18889-bbcode-help/#findComment-82062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.