This is a test template that shows the use of the TemTab class, see the class.TemTab.php file for its definition. Examples are quite basics. Here is the PHP source code of the script generating this page and the HTML template file of this page.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
v1.0 Copyright © 2002 Antoine Delvaux, Cassiopea.
First, let's define some variables and try to replace them. BTW, what time is it ?
It is 21:41:32.
Variable number two you asked ? Here it is enclosed with quotes: 'Here I am, for you to serve !' !
Then let's try to do a loop to be filled with an array of vars.
|1st values||2nd values||3rd values||4th values|
|first line||value 1.1||value 1.2||value 1.3||value 1.4|
|second line||value 2.1||value 2.2||value 2.3||value 2.4|
|third line||value 3.1||value 3.2||value 3.3||value 3.4|
|fourth line||value 4.1||value 4.2||value 4.3||value 4.4|
Then let's try to do a loop with the use of custom variable names.
Want again the first table values but in a different output ? Here it is in list format ! And all with a single statement.
Bonus : none
|first||Antoine||blue||55 + none|
|second||Robert||green||48 + none|
|third||Elena||purple||34 + none|
|fourth||Carmen||white||18 + none|
|fifth||Gauthier||black||12 + none|
|sixth||Francis||red||2 + none|
Bonus : 30
|first||Antoine||blue||55 + 30|
|second||Robert||green||48 + 30|
|third||Elena||purple||34 + 30|
|fourth||Carmen||white||18 + 30|
|fifth||Gauthier||black||12 + 30|
|sixth||Francis||red||2 + 30|
The unused variables of the template have been deleted. See the HTML source code for a comment on how many of them have been replaced.
See also the source code for a comment about the time it took the server to process this page.
That's it for the test.
You really want variable two once again ?
Here I am, for you to serve !