PHP Classes

File: template_file.html

Recommend this page to a friend!
  Classes of minh   Mini Fast Template   template_file.html   Download  
File: template_file.html
Role: Auxiliary script
Content type: text/plain
Description: html template file, including html and php code
Class: Mini Fast Template
Template engine that executes PHP template scripts
Author: By
Last change:
Date: 12 years ago
Size: 1,060 bytes
 

Contents

Class file image Download
<html>
<head>
    <title>Mini & Fast Template</title>
</head>
<body>
<pre>

<B>Example 1. Simple variables assign:</B>
Inteter:<?php var_dump($int_var);?>

String:<?php var_dump($string_var);?>

Boolean: <?php var_dump($boolean_var);?>

<u>You assinged an interger </u>value with values = <?=$int_var?>, and a string value is <?=$string_var?>


<B>Example 2. If else condition..</B>
<? if(isset($show_category)){?>
This is if case: You set to show the category
<? }else{ ?>
This is else case: You have no right to see category.
<? } ?>



<B>Example 3. Working with Loop, php array assign </B>
Structure of fruits: <?php print_r($fruits)?>

Try to loop and print out fruits:
<?php $i=1;?>
<?php
foreach($fruits as $fruit):?>
<?=$i++?>.
    TYPE = <?=$fruit['type']?>

    NAME = <?=$fruit['name']?>

    COLOR = <?=$fruit['color']?>

    PRICE = <?=$fruit['price']?>
<?php endforeach?>

<B>Example 4: assign a class (calling method __toString())</B>
Person is: <?=$person?>


<HR>
--- Thanks ---

</body>
</html>