Number API Reference

 Handle and format variables whose type is Number(integer). These function's argument has to be a string type or integer type variable.

This function is used when you format the number into currency or zero padding formatted string.

format(intVal, pattern)

Format the number.
$pattern example is -
'0000000'
'###,###.###' 

In the pattern "0" means if the scale does not exists, force to insert zero. The "#" means if the scale does not exist, insert nothing.

The type of returned value is string.


Go to Top