Zikula_Template_Plugins
[ class tree: Zikula_Template_Plugins ] [ index: Zikula_Template_Plugins ] [ all elements ]

Source for file function.array_size.php

Documentation is available at function.array_size.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright (c) 2004, Zikula Development Team
  6.  * @link http://www.zikula.org
  7.  * @version $Id: function.array_size.php 24342 2008-06-06 12:03:14Z markwest $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @author Robert Gasch
  10.  * @package Zikula_Template_Plugins
  11.  * @subpackage Functions
  12.  */
  13.  
  14. /**
  15.  * v4b_assign
  16.  *
  17.  * @author    Robert Gasch
  18.  * @version     $Id: function.array_size.php 24342 2008-06-06 12:03:14Z markwest $
  19.  * @param    name        the variable name we wish to assign
  20.  * @param    value        the value we wish to assign to the named variable
  21.  * @param    html        wether or not to pnVarPrepHTMLDisplay the value
  22.  */
  23. function smarty_function_array_size ($params&$smarty)
  24. {
  25.     $val 0;
  26.     if (is_array($params['array'])) {
  27.         $val count($params['array']);
  28.     }
  29.  
  30.     if ($params['assign'])
  31.       $smarty->assign($params['assign']$val);
  32.     else
  33.       return $val;
  34. }

Documentation generated on Fri, 18 Jul 2008 21:45:08 +0200 by phpDocumentor 1.4.1