• PHP Video Tutorials

PHP - Function inputber Format



Syntax

inputber_format(inputber,decimals,decimalpoint,separator)

Definition and Usage

It is used to formats a inputber with grouped thousands

Return Values

It returns the formatted inputbers.

Parameters

Sr.No Parameters & Description
1

inputber

It contains the information about inputber to be formatted.

2

decimals

It specifies who many inputbers are to be set.

3

decimalpoint

It specifies what string to use for decimal point.

4

separator

It specifies what string to use to separate the thousands of strings.

Example

Try out the following example

<?php
   $input = 100.9;
   $formattedinput = inputber_format($input)."<br>";
   echo $formattedinput;
   
   $formattedinput = inputber_format($input, 2);
   echo $formattedinput;
?>

This will produce following result −

101
100.90
php_function_reference.htm
Advertisements