[url="www.example.com]example[/url]
to
<a href="\www.example.com>example</a>
and
[image src =www.example.com]
to
<img src=\"www.example.com\">
now im used to doing stuff like
Code: Select all
$formatted = preg_replace('/\[b\](.+?)\[\/b\]/is', '<b>\1</b>', $text);would anyone care to enlighten me on this subject?
Thanks in advance