-1

When I use the PHP function format_number to convert my variable value which is like 123456789, it converts it with thousand separators like this: 123,456,789. What I want is to format it like this: 12,34,56,789

Is there any way to achieve this?

theduck
  • 2,589
  • 13
  • 17
  • 23
Prince
  • 3
  • 3

1 Answers1

0

Based on this answer:

$amount = 123456789;
setlocale(LC_MONETARY, 'en_IN');
$amount = money_format('%!.0i', $amount);

You can then pass the $amount variable to your blade template.

Ruben Roy
  • 587
  • 3
  • 15
  • 28