PHP Classes

PHP Template Engine Class: Process template files by replacing variable marks

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 181 All time: 8,703 This week: 488Up
Version License PHP version Categories
php-template-engine- 1.0.1MIT/X Consortium ...5PHP 5, Files and Folders, Text proces...
Description 

Author

This class can process template files by replacing variable marks.

It can take the name of a template file and processes it by replacing variables with parameter values passed using array.

The processed template data is returned as a single string.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 22
All time rank: 84411 in Pakistan Pakistan
Week rank: 286 Up6 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

require_once 'classes/Template.php';

$theme = new Template();

echo
$theme->SetTemplate('tamplet.html', [

   
'header' => 'PHP Tamplet engine',

   
'heading' => welcome(),

   
'body' => body(),

]);

function
welcome()
{
    return
'WELCOME';
}

function
body()
{
    return
'Hay this is created by malik umer farooq';
}


Details

PHP Template Engine Class

It is initial release

Description

This class can process template files by replacing variable marks.

It can take the name of a template file and processes it by replacing variables with parameter values passed using array.

The processed template data is returned as a single string.


  Files folder image Files  
File Role Description
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Readme.md Doc. Documentation
Accessible without login Plain text file tamplet.html Data Auxiliary data

  Files folder image Files  /  classes  
File Role Description
  Plain text file Template.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:181
This week:0
All time:8,703
This week:488Up