Home | Online Examples | Documentation | Forum | Page of Project | Download

TPLN Manual

ShowRecords function

RewriteUrl
SetNavColor
SetUrl
UrlAddVar
CreateFieldVars

 

CreateFieldVars

void CreateFieldVars( string|Array bloc_path, array fields)

the function CreateFieldVars() permits to create variables in a bloc containing your field transformed in keyword.

This function uses keyword {_Field} in your last bloc.
Your bloc path must have a parent bloc.
At end, the last bloc is erased in your template.
You can path an array containing all bloc path


<?php

include("TPLN/TPLN.php");

$TPLN = new TPLN;
$TPLN->Open("template.html");

$TPLN->DbConnect();
$TPLN->CreateFieldVars("data.loop.dynam", "SELECT * FROM table LIMIT 1"); // create variables
$TPLN->ShowRecords("SELECT * FROM table",10);
$TPLN->DbClose();

$TPLN->Write();

?>


Attention !
Since TPLN 1.5
TopTop