Twango Posted August 19, 2011 Share Posted August 19, 2011 Hi, I'm trying to use this code I made and doesn't really work well.I want, so say a user has 9000 XP, it says "LEVEL 9" (Divided by 1000, obviously)But you get crazy results when you have say, 9812 XP, I want it to still say "LEVEL 9"So... is there any easy code I can use to remove decimals? Link to comment Share on other sites More sharing options...
thescientist Posted August 19, 2011 Share Posted August 19, 2011 floor ithttp://php.net/manual/en/function.floor.php Link to comment Share on other sites More sharing options...
Ingolme Posted August 20, 2011 Share Posted August 20, 2011 You can use round() if you want more accurate results, though for levels you probably want floor() after all. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.