<?php ?>
Lecz nie wyświetla mi pokolorowanego tekstu tylko to: \1 1
<?php ?>
function bbcode($s) { $s = str_replace("]\n", "]", $s); $match = array('#[pehape](.*?)[/pehape]#se'); $replace = array("'<div>'.highlight_string(stripslashes('$1'), true).'</div>'"); return preg_replace($match, $replace, $s); } echo bbcode($txt);
<?php $txt = '[pehape][/pehape]'; function bbcode($s) { } ?>