View Single Post
(#7 (permalink))
Old
Megalith Megalith is offline
Junior Member
Megalith is on a distinguished road
 
Posts: 14
Join Date: Feb 2009
Default 03-05-2009, 12:41 PM

Quote:
Originally Posted by weishun View Post
I don't know if it's a language or comprehension problem but the objective here is: "the cleanest and most efficient way of storing chunks of HTML for output". Entering the HTML, manually, is neither.

Code:
include("htmlTpl.tpl");
is, pretty much, what I suggested. I wasn't aware you could store "chunks", plural, of HTML in a single 'tpl' file. How does the 'tpl' file know which chunk to output, for a particular page?
as aPhpHelper says the use of includes is not the most efficient way of handling simple html code. the fastest way is to not use the php interpreter at all unless you need it, hence my suggestion above which exits the php and sending the html direct to the browser rather than parsing it through a template or having function calls. in that sense it is the most efficient way of outputting html
Reply With Quote