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

Source for file modifier.div.php

Documentation is available at modifier.div.php

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8.  
  9. /**
  10.  * Smarty plugin
  11.  * -------------------------------------------------------------
  12.  * Type:     modifier
  13.  * 
  14.  * -------------------------------------------------------------
  15.  */
  16. function smarty_modifier_div($string,$num,$max=10)
  17. {
  18.     if($num==0return 0;
  19.     if(ceil(strlen($string)/$num)>$maxreturn $max;
  20.     return ceil(strlen($string)/$num);
  21. }
  22.  
  23. /* vim: set expandtab: */
  24.  
  25. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:09 +0000 by phpDocumentor 1.5.0-lsces