Hi
I write a bbcode and I have a problem. I have this code:
function bbcode($tresc)
{
//...
$tresc=str_replace("\n",'<br />',$tresc);
$tresc=preg_replace('/\[\-\]([\w\W]+?)\n?(?=(?:(?:\[\-\])|(?:\[\/lista\])))/is','<li>\\1</li>',$tresc);
$tresc=preg_replace("/\[lista\](.*?)\[\/lista\]/is",'<ul>\\1</ul>',$tresc);
return $tresc;
}
I would like to in the tag [list] [/ list] - sign <br /> - turned to back to \n
I do not know how to do it. Please help.