3rd fix and added currency thing..
This commit is contained in:
parent
c3ee098a72
commit
df9af2107e
|
|
@ -21,16 +21,17 @@ class PartyStarter {
|
|||
$query->bindParam(':id', $id);
|
||||
$query->execute();
|
||||
$money = $query->fetch(PDO::FETCH_ASSOC)["money"];
|
||||
$currencyIcon = "$";
|
||||
|
||||
if ($money < 1000000) {
|
||||
// Anything less than a million
|
||||
$money = number_format($money);
|
||||
$money = $currencyIcon.number_format($money);
|
||||
} else if ($money < 1000000000) {
|
||||
// Anything less than a billion
|
||||
$money = number_format($money / 1000000, 1) . 'M';
|
||||
$money = $currencyIcon.number_format($money / 1000000, 1) . 'M';
|
||||
} else {
|
||||
// At least a billion
|
||||
$money = number_format($money / 1000000000, 1) . 'B';
|
||||
$money = $currencyIcon.number_format($money / 1000000000, 1) . 'B';
|
||||
|
||||
}
|
||||
// messy shit sorry mario1 fix it urself :trol:
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
@cmd
|
||||
Loading…
Reference in New Issue