I'm having doubts about how to convert an amount of an api I'm using. I have the value of 25000 integers and I need to convert it to $250.00. However, I didn't even find a way to convert these integer values, since normally the amount is a decimal value equal to 250.00 and so on.
What have I tried:
$amount = 25000;
$formatter = new NumberFormatter('en', NumberFormatter::CURRENCY);
echo $formatter->formatCurrency($amount, 'USD'); //return $25,000.00
How can I get this result:
$amount = 25000; //return $250,00