Kingy Posted March 22, 2010 Share Posted March 22, 2010 I have some code that allows me to place quotes in the comments section on my site. But I can't seem to make it work for multiple quotes in the same post. For example: [quote=Kingy][quote=Person]This is the first quote[/quote]This is the second quote[/quote] I am posting this comment with a quote within a quote and it doesn't display properly The code i'm using is... <?php $pattern[] = "/\[quote=(.+?)\][\r\n]*(.+?)\[\/quote\][\r\n]*/is"; $replacement[] = '<div class="quote"><div class="quoteheader">\\1: </div>\\2</div><br />'; ?> Within that pattern I could match quote=(.+?) one or more times. Would that work? If so how would I then get it to replace it with the div code one or more times? Or should I be doing it another way? Link to comment https://forums.phpfreaks.com/topic/196173-bb-code-quote/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.