PHP Classes

File: plugin/for.php

Recommend this page to a friend!
  Classes of bassam alessawi  >  Sfhati PHP engine  >  plugin/for.php  >  Download  
File: plugin/for.php
Role: Auxiliary script
Content type: text/plain
Description: Class source
Class: Sfhati PHP engine
Template engine that generates PHP compiled files
Author: By
Last change:
Date: 7 years ago
Size: 737 bytes


Class file image Download
  use like [for:"id for this loop","start counter","count to","content loop"end for]
  [for:"lop","4","10","this is %lop% , so can use as a var like %lop-var% "end for]
 <?php for($lop=4;$lop<10;$lop++){ ?>
    this is <?php echo "$lop"; ?> , so can use as a var like $lop
 <?php }?>

function for_SYNTAX($vars) {
    foreach (
$vars as $v => $var) {
$vars[$v] = $syntaxcode->Syntax($var);
$vars[3] = str_replace('%' . $vars[0] . '%', "<?php echo \"\$$vars[0]\"; ?>", $vars[3]);
$vars[3] = str_replace('%' . $vars[0] . '-var%', "\$$vars[0]", $vars[3]);

<?php for(\$
$vars[0]=$vars[1];\$$vars[0]<$vars[2];\$$vars[0]++){ ?>
<?php }?>

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