Original Post
So I am trying to calculate XP levels, every 1000 points. The code I have works, but my code is triggering at 500,1500, 2500 etc to go to the next level, rather than at 1000,2000, 3000 etc. I tested and found that when the xp hits 1500, the code triggers because the PHP round function rounds up. If you divide 1551 by 1000 yu get 1.51 and the round function says good enough - it's 2. $orig_result = round($orig_result); So what I'd like to know/see is some PHP code that will do this 1000/1000 = 1 2000/1000 = 2 etc... Thanks Eliia