Hello everyone.
I am working on this forum/post/script type thing.
What I want to do is convert this example to HTML.
[div]
[p]Some text[/]
[div]
Some more text
[/]
[/]
--->
<div>
<p>Some text</p>
<div>
Some more text
</div>
</div>
I don't want to use [/div] or [/p] to keep it short, but that is the problem where I get stuck.
This is what I've tried, it doesn't work:
$string = preg_replace('/\[div\](.*)\[/\]/s', '<div>\\1</div>', $string);
Please help!