Dankoo
Active Member
- Joined
- Sep 4, 2010
- Messages
- 1,007
- Reaction score
- 27
How do I set an value like this: 86.43% to be shown like 86%?
I've tried with (int) code
But it hides float numbers and only show integers, I want one that rounds the value for it to become integer xD
I've tried with (int) code
But it hides float numbers and only show integers, I want one that rounds the value for it to become integer xD
PHP:
$questCount = $questCount + 1; $questStatus = $SQL->query("SELECT * FROM `player_storage` WHERE `player_id` = ".$id." AND `key` = ".$questData["storageid"].";")->fetch();
$questPercent = (($questStatus["value"] - $questData["startvalue"])/$questData["endvalue"]) * 100;
$main_content .= "<center><table WIDTH=50%><td width=\"55%\">".$questName."</td><td width=\"45%\" style=\"text-align:center;\">".$questPercent."%<div style=\"background-color:white; margin-top:-14px; width: 100%; height: 12px; border: 1px solid #DDD;\"><div style=\"background: green; width: ".$questPercent."%; height: 12px;\"></div></div></td></tr></table></center>";