Web Development With PHP FastTemplate - Who Am I? (
Page 2 of 9 )
Let's begin with a simple example of how
FastTemplate works. Consider the following HTML page - I've called it
"mypage.tpl" - which contains personal information about a specific user.
<!-- begin: mypage.tpl -->
<html>
<head>
</head>
<body>
<b>Name</b>: {FNAME} {LNAME}
<p>
<b>Age</b>: {AGE}
<p>
<b>Email address</b>: {EMAIL_ADDRESS}
<p>
<b>Tel</b>: {TEL}
</body>
</html>
<!-- end: mypage.tpl -->
As you can see, this page does not contain any data per se; instead,
FastTemplate variables (enclosed in curly braces) are used as placeholders in
the appropriate locations. Once the FastTemplate engine parses the document,
these variables will be replaced with their actual values.