I want to convert the [img] bbcode of SMF to HTML, it looks like this:
[img width=600 height=300]url[/img]
My script is this, but doesn't work, what's wrong?
$text = preg_replace("/\[img width=(.*) height=(.*)\](.*)\[\/img\]/Usi", "<img src=\"\\3\" class=\"image\" style=\"width:\\1; height:\\2\" />", $text);