"Prepare for an oblivion for which there is no preparation." - O'Malley (Red Vs Blue)
Forums :: Test Forum :: Testing New [code] Feature
Version 1.0:
$matchCount = preg_match_all("/\[code\](.*?)\[\/code\]\", $text, $matches);
for($a=0; $a<$matchCount; $a++)
{ $replacement = str_replace(array("[", "]"), array("[", "]"), $matches[1][$a]);
$text = str_replace($matches[0][$a], $replacement, $text);
}
This simply swaps square brackets for their ASCII equivalents.
$matchCount = preg_match_all("/\[code\](.*?)\[\/code\]\", $text, $matches);
for($a=0; $a<$matchCount; $a++)
{ $replacement = str_replace(array("[", "]"), array("[", "]"), $matches[1][$a]);
$text = str_replace($matches[0][$a], $replacement, $text);
}
This simply swaps square brackets for their ASCII equivalents.
"Prepare for an oblivion for which there is no preparation." - O'Malley (Red Vs Blue)
Add Post
You must be Archangel/1B or greater to add posts to this thread.