| [ Index ] |
PHP Cross Reference of Xoops v2.3.1 |
|
[Global whois Lookup] [Ranchi, Jharkhand, India website] [Hindi Magazine] [Desi Community website in tristate area] [B 4 Bollywood] [Internet nation of India] |
|
[Source view] [Print]
foreachq Smarty compiler plug-in See the enclosed file LICENSE for licensing information. If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
| Author: | Skalpa Keo |
| Copyright: | The XOOPS project http://www.xoops.org/ |
| License: | http://www.fsf.org/copyleft/gpl.html GNU public license |
| Version: | $Id: compiler.foreachq.php 506 2006-05-26 23:10:37Z skalpa $ |
| File Size: | 104 lines (4 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| smarty_compiler_foreachq( $argStr, &$comp ) X-Ref |
| Quick foreach template plug-in This plug-in works as a direct replacement for the original Smarty {@link http://smarty.php.net/manual/en/language.function.foreach.php foreach} function. The difference with <var>foreach</var> is minimal in terms of functionality, but can boost your templates a lot: foreach duplicates the content of the variable that is iterated, to ensure non-array variables can be specified freely. This implementation does not do that, but as a consequence requires that the variable you specify in the <var>from</var> parameter is an array or (when using PHP5) an object. Check the difference between the code generated by foreach and foreachq to understand completely. <b>Note:</b> to use foreachq, only the opening tag has to be replaced. The closing tab still remains {/foreach} <code> // Iterate, slow version {foreach from=$array item=elt} {$elt} {/foreach} // Iterate, fast version {foreachq from=$array item=elt} {$elt} {/foreach} </code> |
|
[ Xoops] [PhpNuke] [PostNuke] [Joomla] [Drupal] [E107] [NucleusCms] |
|||
|
[Php-Fusion] [PhpBB] [WordPress] [Typo3] |
|||
| Generated: Mon Oct 27 11:51:45 2008 | |||