printing variables in formated text?

I under stand what you are saying about the RAM, does it free it back up after it prints the line or save it till it does the entire code. If it does the entire code I will not be able to do it since the HTML code is several hundred lines and most of them will have variables.