PHP doesn't repeal the laws of HTML. You can't embed binary data in HTML. You have to refer to it by pointing to a unique URL.
<img src="./getmyblobpicture.php?id=400" width="100" height="50" />
In other words: images and text go in separate URLs.
The bottom line is that you CAN put images in a database and use PHP to regenerate them ... but why? A database is not necessarily a good place to put large binary objects.
The typical large-scale content-management/production system will store media files in the filesystem, and store metadata in the database. The DB is used to locate the proper object, but not to store and serve it. The latter is simple work, and the filesystem is faster/lighter/cheaper for simple tasks.
Our company (Morris Digital Works) makes such systems. Our classified systems power all of the Morris newspapers, and we've recently licensed our technology to Media General and A.H. Belo. We have a very sophisticated data model implemented on Oracle, and we have invested many, many man-years in a powerful proprietary templating language called MTL.
But we store images in the filesystem.