You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OK, I have spent countless hours trying to get a custom formatter working... but I just don't have the knowledge to code this. I found a PHP snippet that does what I need it to do, but how do I use the code with CustomFormatter?
Basically I want the user to input the actual number that will be in millions, ie: 2,300,587.00 but I want it formated in certain instances as only 2.3 Million etc.
OK, I have spent countless hours trying to get a custom formatter working... but I just don't have the knowledge to code this. I found a PHP snippet that does what I need it to do, but how do I use the code with CustomFormatter?
Basically I want the user to input the actual number that will be in millions, ie: 2,300,587.00 but I want it formated in certain instances as only 2.3 Million etc.
Here is the code:
1000000000000) return round(($n/1000000000000),2).' trillion'; else if($n>1000000000) return round(($n/1000000000),2).' billion'; else if($n>1000000) return round(($n/1000000),2).' million'; else if($n>1000) return round(($n/1000),2).' thousand'; return number_format($n); } ``` echo nice_number('14120000'); //14.12 million ?>
The text was updated successfully, but these errors were encountered: