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: 11 years ago
Size: 1,060 bytes


Class file image Download
    <title>Mini & Fast Template</title>

<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;?>
foreach($fruits as $fruit):?>
    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?>

--- Thanks ---


For more information send a message to info at phpclasses dot org.