Google Currency Converter - How to change number of decimal places for the converted currency? |
| Written by kksou | ||
| Friday, 04 May 2012 | ||
|
This is in response to asscore's question - How to change number of places after the decimal for the Google Currency Converter module. By default, Google returns the converted currency in 4 decimal places. To change to 2 decimal places, all we need to do is to grab the value of the converted currency and use the standard PHP Solution
$data = $app->process(); The variable $data = number_format($data, 2); This will format the output to 2 decimal places. |
||
| < Prev | Next > |
|---|




