Source for file modifier.join.php

Documentation is available at modifier.join.php

  1. <?php
  2. /**
  3.  *  smarty modifier:join()
  4.  *
  5.  *  join()関数のwrapper
  6.  *
  7.  *  sample:
  8.  *  <code>
  9.  *  $smarty->assign("array", array(1, 2, 3));
  10.  *
  11.  *  {$array|@join:":"}
  12.  *  </code>
  13.  *  <code>
  14.  *  1:2:3
  15.  *  </code>
  16.  *
  17.  *  @param  array   $array  join対象の配列
  18.  *  @param  string  $glue   連結文字列
  19.  *  @return string  連結後の文字列
  20.  */
  21. function smarty_modifier_join($array$glue)
  22. {
  23.     if (is_array($array== false{
  24.         return $array;
  25.     }
  26.     return implode($glue$array);
  27. }

Documentation generated on Fri, 11 Nov 2011 03:58:44 +0900 by phpDocumentor 1.4.3