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] Quote Link to comment 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] Quote Link to comment 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 :( Quote Link to comment 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] 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.