HomePHP Page 7 - Web Development With PHP FastTemplate
A Strict() Master - PHP
Typically, most PHP-based Web sites use scripts which containintermingled PHP and HTML code. While this speeds up development, it alsohas a downside: an interface designer cannot modify page layouts or HTMLtemplates without the assistance of an experienced PHP developer. Well,there's a solution to the problem - and you'll be surprised to hear thatit's been around for quite a while. Say hello to PHP FastTemplate.
While the methods discussed above will suffice for most of your FastTemplate requirements, the class also comes with a bunch of ancillary capabilities.
The strict() method is used to display an error if FastTemplate finds template variables without any values assigned to them; these undefined variables will also appear as is in the final output.
<?
// strict error checking
$obj->strict();
?>
The opposite of this is the no_strict() method, which replaces these
unassigned variables with empty strings.
<?
// turn off error checking
$obj->no_strict();
?>
The fetch() method returns the raw data which results from a parse()
operation. Consider the following: