This is an old revision of the document!
WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Return the string value of a number formatted to a particular precision
Return the string value formatted at the specified precision
$value: A number
$precision: An int specifying the precision after the decimal point. Use 0 to round to a whole number.
String value
<? $f=1.55; $i=number_format($f,1); print("The integer value of ".$f." is ".$i); ?>
The above example will output:
The integer 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)