[left][/left][center][/center][right][/right]
$bb2html = str_replace('[left]', '<div align="left">', $bb2html);
$bb2html = str_replace('[/left]', '</div>', $bb2html);
$bb2html = str_replace('[center]', '<div align="center">', $bb2html);
$bb2html = str_replace('[/center]', '</div>', $bb2html);
$bb2html = str_replace('[right]', '<div align="right">', $bb2html);
$bb2html = str_replace('[left]', '<div style="float: left">', $bb2html);
$bb2html = str_replace('[/left]', '</div>', $bb2html);
$bb2html = str_replace('[center]', '<div style="float: center">', $bb2html);
$bb2html = str_replace('[/center]', '</div>', $bb2html);
$bb2html = str_replace('[right]', '<div style="float: right">', $bb2html);
[left][img="http://dev.network-13.com/news/uploads/batmangir.jpg"][/img][/left]This text will be wrapped around the right side of the image because the image is floated to the left
$bb2html = str_replace('[left]', '<div align="left">', $bb2html);
$bb2html = str_replace('[right]', '<div align="right">', $bb2html);
$bb2html = str_replace('[left]', '<div style="float: left; margin: 5px 10px 5px 0">', $bb2html);
$bb2html = str_replace('[right]', '<div style="float: right; margin: 5px 0 5px 10px">', $bb2html);