hi, im trying to figure out why preg replace wont replace all the quotes that are being quoted ..
for instance ..
[.quote=user1 on 04/11/06 @ 11:54 PM]
[.quote=user2 on 04/11/06 @ 11:32 PM]message[./quote]
message2[./quote]
Basically ... its a quote, inside a quote ... but it will only quote the first quote properly, and it displays the second one as text ...
this is the preg replace function im using for replacements to the quote bb code
$simple_search = array(
'/\[b\](.*?)\[\/b\]/is',
'/\[s\](.*?)\[\/s\]/is',
'/\[i\](.*?)\[\/i\]/is',
'/\[u\](.*?)\[\/u\]/is',
'/\[url\=(.*?)\](.*?)\[\/url\]/is',
'/\[url\](.*?)\[\/url\]/is',
'/\[img\](.*?)\[\/img\]/is',
'/\[center\](.*?)\[\/center\]/is',
'/\[right\](.*?)\[\/right\]/is',
'/\[left\](.*?)\[\/left\]/is',
'/\[email\=(.*?)\](.*?)\[\/email\]/is',
'/\[email\](.*?)\[\/email\]/is',
'/\[quote\=(.*?)\](.*?)\[\/quote\]/is',
'/\[divider\](.*?)\[\/divider\]/is',
'/\[font\=(.*?)\](.*?)\[\/font\]/is',
'/\[size\=(.*?)\](.*?)\[\/size\]/is',
'/\[color\=(.*?)\](.*?)\[\/color\]/is',
);
$simple_replace = array(
'<strong>$1</strong>',
'<s>$1</s>',
'<em>$1</em>',
'<u>$1</u>',
'<a href="$1" target="_blank">$2</a>',
'<a href="$1" target="_blank">$1</a>',
'<img src="$1" />',
'<div align="center">$1</div>',
'<div align="right">$1</div>',
'<div align="left">$1</div>',
'<a href="mailto:$1">$2</a>',
'<a href="mailto:$1">$1</a>',
'<div class="quote"><p><strong>QUOTING $1</strong><br />$2</p></div>',
'<hr />',
'<span style="font-family: $1;">$2</span>',
'<span style="font-size: $1;">$2</span>',
'<span style="color: $1;">$2</span>',
);
the line that says div class="quote" is the actual replacement line
Any ideas on how i could get this to double quote properly? and triple quote properly?
No matter how many [.quotes] were embedded within each other, it needs to format them properly ...
Thanks for any help