Well paint me purple and call me stupid. I thought that the end tag would have to surround what was being called from the db to close the start tag preceding it.
Thanks. Now that I know that, maybe I can figure out how to do partial img's tags and only store the filename in the db.
Read the php.net manual for sprintf - it explains the way to use sprintf and printf, esp if you wanna have your variables in a different order than the placement of them in the $format.