Jump to content

preg_replace with quoting


Guernica

Recommended Posts

I have a code that uses preg_replace to create bbcode from the form submitted. Within the preg_replace is this:

 

	'/\[quote\](.*?)\[\/quote\]/is',
	'/\[quote\=(.*?)\](.*?)\[\/quote\]/is',

 

This only works for one instance of the quote tag. I tried submitting something like [*quote=user1] lala [*quote=user2]ooo[/*quote][/*quote].

 

It only tags the first instance, how do I do this for multiple ones? Thanks!

Link to comment
https://forums.phpfreaks.com/topic/135565-preg_replace-with-quoting/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.