When I try to quote a post already quoted previous it will look like this
[QUOTE=JasonDavis][QUOTE=JasonDavis]You can now quote of forum post, its not 100% done but it works[/QUOTE]<br><br>test[/QUOTE]
how could I make it only do it 1 time?
here is the code I use on the form that creates this
if ($_GET['quote2'] == 1) {
$sql = "select user_id,topic from friend_forum_topic where auto_id='$_GET[topic_id]'";
$result = executeQuery($sql);
if ($line = mysql_fetch_array($result)) {
$name=show_user_name($line['user_id']);
$text = "[QUOTE=$name]" .$line['topic']. "[/QUOTE]"."\n\n";
}
}
Maybe somehow this code below could count the number of matches and if greater then 1, only use 1 of them?
$reply = preg_replace("/\[quote=(.+?)\](.+?)\[\/QUOTE\]/is","$QuoteLayout", $reply);