Source for file modifier.number_format.php

Documentation is available at modifier.number_format.php

  1. <?php
  2. /**
  3.  *  smarty modifier:number_format()
  4.  *
  5.  *  number_format()関数のwrapper
  6.  *
  7.  *  sample:
  8.  *  <code>
  9.  *  {"12345"|number_format}
  10.  *  </code>
  11.  *  <code>
  12.  *  12,345
  13.  *  </code>
  14.  *
  15.  *  @param  string  $string フォーマット対象文字列
  16.  *  @return string  フォーマット済み文字列
  17.  */
  18. {
  19.     if ($string === "" || $string == null{
  20.         return "";
  21.     }
  22.     return number_format($string);
  23. }

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