I am getting the data through the api and when it comes to the price of the product data is like amount -> 18625 and fractionDigits->2. So in this case the output should be 186.25, How can I do this with php.
$x = 18625; $fractionDigits = 2; echo number_format($x / pow(10, $fractionDigits), $fractionDigits);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)