Mailinglisten-Archive | 
Hallo Liste,
ich habe mal angefangen mich damit zu besch=E4ftigen und das Beispiel
in der Docu nachgemacht. Doch leider funktioniert das nicht. Ich paste
hier mal den kleine Code rein, vielleicht kann mir jemand sagen wo ich
was falsch mache:
<------------------ Schnipp --------------------->
$t =3D new Template("html", "keep");
$t->set_file(array(
	"page" =3D> "page.html",
	"box" =3D> "box.html"));
$t->set_block("box", "row", "rows");
$t->set_var(array(
	"PAGETITLE" =3D> "Diest ist eine Testpage"));
for ($i=3D1; $i<3; $i++) {
	$n =3D $i;
	$nn =3D $i * 2;
=09
	$t->set_var(array("WERT1" =3D> $n, "WERT2" =3D> $nn));
	$t->parse("rows", "row", true);
}
$t->parse("out", array("box", "page"));
$t->p("out");
<--------------------- Schnapp ----------------------->
Tempalte box.html sieht so aus:
<------------------ Schnipp --------------------->
<table>
	<!-- start row -->
	</tr>
		<td bgcolor=3D"#808080">{WERT1}</td>
		<td bgcolor=3D"#c0c0c0">{WERT2}</td>
	</tr>
	<!-- end row -->
</table>
<--------------------- Schnapp ----------------------->
In dem Template page.html gebe ich das ganze mit {OUT} aus.!
Vielen Dank im vorraus
Rene
    php::bar PHP Wiki - Listenarchive