php - How to show number in readable format -


i want know how can add comma's numbers. want change number 5,272,945.31 52,72,945.31 possible php function?

i have try code:

number_format($amount,2); 

the value assigned $amount isn't formatted correctly, however, number_format doesn't , strip these out before passing number_format.

number_format(str_replace(',', '', $amount), 2); 

example: https://3v4l.org/dpaep


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -