hello,
I'm trying to do a bbcode that highlight the string between [code] so i foum this.
$string = preg_replace("/\[code\](.+?)\[\/code\]/eiU", "highlight_string(\"$1\", true);", $string);
It works if $string in only in one line
$string ="[ code] <?php echo 'do'; [/code ]";
But if i make in more lines.
$string ="[ code]
<?php
echo 'do';
[/code ]";
Not working
Any help ?
I'm trying to do a bbcode that highlight the string between [code] so i foum this.
$string = preg_replace("/\[code\](.+?)\[\/code\]/eiU", "highlight_string(\"$1\", true);", $string);
It works if $string in only in one line
$string ="[ code] <?php echo 'do'; [/code ]";
But if i make in more lines.
$string ="[ code]
<?php
echo 'do';
[/code ]";
Not working
Any help ?
Comment