Gen. partnerAlgotech

PHP function money_format()

Formats a number as a currency string

|
September 11, 2019

Availability in versions: PHP 4.3.0

Formats a number as a currency string

Parameters

Parameter Data type Default value Note
$format string not The format specification consists of the following sequence:

a % character

$number float not The number to be formatted.

Return values

string

the formatted string. Characters before and after the formatting string will be returned unchanged. Non-numeric number causes returning &null; and emitting E_WARNING.

Other resources

Official money-format documentation

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.