You dont necessarily have to have a seperate PHP page/script serve up the image, you could base64 encode the stream and embed it into your markup as you asked. Assuming you have a variable, for example $imagestream that equals the image field from your table row access routine, you could do this:
 . ')';
?>
This works well for reasonably small to medium images, but be aware of two things: The page load time is increased as the image data is encoded in the HTML (actually bloated). Be sure your mime type is correct for the image. :)