User Tools

Site Tools


uphp:functions:number_format

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:number_format [2017/05/11 08:57]
admin
uphp:functions:number_format [2021/09/13 05:57] (current)
Line 3: Line 3:
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-<html>Return the <b><span style="color:green">string<span style="color:black"></b> value of a <b><span style="color:green">number<span style="color:black"></b> formatted to a particular precision</html>+<html>Return the <b><span style="color:green">string<span style="color:black"></b> value of a <b><span style="color:blue">number<span style="color:black"></b> formatted to a particular precision</html>
  
 ====Description==== ====Description====
Line 11: Line 11:
 <span style="color:black">number_format ( <span style="color:black">number_format (
 <span style="color:green">mixed</span> <span style="color:green">mixed</span>
-<span style="color:blue">$value</span>, +<span style="color:blue">$number</span>, 
 <span style="color:green">int</span> <span style="color:green">int</span>
-<span style="color:blue">$precision</span>+<span style="color:blue">$digits</span>
 )</span> )</span>
 </html></well> </html></well>
- 
-Return the <html><b><span style="color:green">string<span style="color:black"></b></html> value formatted at the specified precision 
  
 ====Parameters==== ====Parameters====
  
-<html><b><span style="color:blue">$value<span style="color:black"></b>:  A <b><span style="color:green">number<span style="color:black"></b> </html>+<html><b><span style="color:blue">$number<span style="color:black"></b>:  A <b><span style="color:green">number<span style="color:black"></b></html>
  
-<html><b><span style="color:blue">$precision<span style="color:black"></b>:  An <b><span style="color:green">int<span style="color:black"></b> specifying the precision after the decimal point.  Use 0 to round to a whole number.</html>+<html><b><span style="color:blue">$digits<span style="color:black"></b>:  An <b><span style="color:green">integer<span style="color:black"></b> specifying the precision after the decimal point.  Use 0 to truncate to a whole number.</html>
  
-====Return Value====+====Return Values====
  
-<html><b><span style="color:green">String<span style="color:black"></b></html> value+<html><b><span style="color:green">String<span style="color:black"></b></html> value formatted at the specified precision
  
 ====Example==== ====Example====
Line 37: Line 35:
   $f=1.55;   $f=1.55;
   $i=number_format($f,1);   $i=number_format($f,1);
-  print("The integer value of ".$f." is ".$i);+  print("The value of ".$f." is ".$i);
 ?> ?>
 </code> </code>
Line 43: Line 41:
 The above example will output: The above example will output:
 <code> <code>
-The integer value of 1.550000 is 1.5+The value of 1.550000 is 1.5
 </code> </code>
  
uphp/functions/number_format.1494493026.txt.gz · Last modified: 2021/09/13 05:56 (external edit)