[PHP-DOC] cvs: phpdoc /en/functions math.xml From: Damien Seguy (dams <email protected>)
Date: 05/07/01

dams Mon May 7 02:13:27 2001 EDT

  Modified files:
    /phpdoc/en/functions math.xml
  Log:
  Added example with number_format.Any other useful format may be added...
  
Index: phpdoc/en/functions/math.xml
diff -u phpdoc/en/functions/math.xml:1.25 phpdoc/en/functions/math.xml:1.26
--- phpdoc/en/functions/math.xml:1.25 Sat May 5 22:22:48 2001
+++ phpdoc/en/functions/math.xml Mon May 7 02:13:26 2001
@@ -842,6 +842,24 @@
      the decimals and <parameter>thousands_sep</parameter> instead of
      a comma (",") between every group of thousands.
     </para>
+ <para>
+ For instance, French notation usually use two decimals,
+ comma (',') as decimal separator, and space (' ') as
+ thousand separator. This is achieved with this line :
+ <informalexample>
+ <programlisting role="php">
+&lt;?php
+ $nombre = 1234.56;
+ // english notation (default)
+ $english_format_number = number_format($nombre);
+ // 1,234.56
+ // French notation
+ $nombre_format_francais = number_format($nombre, 2, ',', ' ');
+ // 1 234,56
+?&gt;
+ </programlisting>
+ </informalexample>
+ </para>
    </refsect1>
   </refentry>