Relax for a minute, try not to think about what you expect your code to do (because it's not doing what you expect).
When you echo a string, php sends the string to the browser as part of the response; it makes no attempt to run any php code that's inside the string being echo'd.
So you need to force php to interpret the string as php code. The two most common ways to do this are to either "include" a file with some code in it, or put the code in a string and tell php to run what's in the string with the "eval" function.
Take a look at the manual entry for "include", it gives an example that would work for you; instead of storing the html in the database, you would have to store it in a file and store the name of the file in the database. Then your code would be almost the same as the example given here; instead of a "for" loop on the array of file names, you would have the "while" loop fetching them from the database.
http://www.phpbuilder.com/manual/function.include.php
The other way to do it is with the "eval" function, but I've always found code with lots of eval'd strings hard to get working right.
Try out "include" first.