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

TPLN Manual

Functions

Open
DirectIOWrite
DirectIOOutput
DefineTemplate
SetTemplate
ChangeTemplate
ParseGlobals
Parse
FastParse
LoadArrayInBloc
Loop
EraseItem
EraseBloc
GetFile
ParseBloc
ReloadBlocVars
IncludeFile
GetBlocInFile
Write
Output
SaveTemplate
ItemExists
BlocExists
#include Command
Automatic parsed variable
SetChrono

 

Parse

void Parse( string item , string replace [, string functions ] )

The Parse() function serves to replace a variable defined in your file template. TPLN uses a pseudo language object of style javascript to reach your variable thanks to the separator ". ".

This function also possesses a parameter optional functions. The one serves to format the text here of replace. These options are the following :
  • |B adds to replace what makes it bold
  • |I adds to replace what makes it italic
  • |U adds to replace what makes it underline
  • |Php function name any Php functions (ucfirst for example)


<?php

// Parse
$TPLN->Parse("my_variable","replace");

// Parse in bloc
$TPLN->Parse("my_bloc.my_variable","replace");

// Parse in bloc with format
$TPLN->Parse("my_bloc.my_variable","replace","|B");

?>


TopTop