Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/templates/variable.tpl

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jin Nguyen  >  Puja  >  examples/templates/variable.tpl  >  Download  
File: examples/templates/variable.tpl
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Puja
Template engine that compiles templates into PHP
Author: By
Last change:
Date: 1 year ago
Size: 273 bytes
 

Contents

Class file image Download
{% extends master.tpl %}
{% block body %}
	Simple: {{ username }}
	Element of array: {{ user.name }}
	Special variable( = user.age ): {{ user.{$ special_var $} }}
	Set variable: {% set my_name = 'Puja' my_age=20 %} => show value: {{ my_name }} - {{ my_age }}
{% endblock %}