compiler = $compiler; // {for $x=0; $x<$y; $x++} syntax $this->required_attributes = array('ifexp', 'start', 'loop', 'varloop'); // check and get attributes $_attr = $this->_get_attributes($args); $this->_open_tag('for'); $output = "tpl_vars[$_statement[var]] = new Smarty_Variable;"; $output .= " \$_smarty_tpl->tpl_vars[$_statement[var]]->value = $_statement[value];\n"; } $output .= " if ($_attr[ifexp]){ for (\$_foo=true;$_attr[ifexp]; \$_smarty_tpl->tpl_vars[$_attr[varloop]]->value$_attr[loop]){\n"; $output .= "?>"; // return compiled code return $output; } } ?>