As the images are floated then obviously any following content will sit to the side of the image unless you set it to clear or don't float the image at all.
Originally Posted by WorldNews
If you want pairs of elements floated then wrap them both in a parent div and float the parent instead.
<div class="image-float-left" style="float: left;">
' . $image_code. '
However as Ralph said we'd probably need to know more about what you have in place already.
<div style="float: left;">
<div>' . $image_code. '</div>