WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Return the string value of a number formatted to a particular precision
$number: A number
$digits: An integer specifying the precision after the decimal point. Use 0 to truncate to a whole number.
String value formatted at the specified precision
<? $f=1.55; $i=number_format($f,1); print("The value of ".$f." is ".$i); ?>
The above example will output:
The value of 1.550000 is 1.5
floatval() - Return the float value of a number or string
strval() - Return the string equivalent of a number
is_numeric() - Check if a value is numeric (int, float or numeric string)
ieee754toint() - Convert a float value to an IEEE-754 encoded integer (32 bit)