im having problems, if the same tag is over lapping like:
test
then it would just replace the 1st "
" and "[/quote ]" and the others just show as text and not been replaced. str_replace is a option but people would be able to leave tags open. is there anyway round this? i cant seem to work it out or find any info on it anywhere.
(i added a space after quote so it didnt use them here)
this is the code im using:
$message = preg_replace( "/\[code\](.*?)\[\/code\]/", "<br /><b>Code</b><table width=\"98%\" border=\"0\" cellspacing=\"5\" cellpadding=\"0\" align=\"center\" class=\"code\"><tr><td>\\1</td></tr></table>", $message);