PHP Get Experience by Level
问题 I have this piece of code that loops 1 through 99 and is a formula. function getExperienceByLevel ($maxLevel) { $levels = array (); $current = 0; for ($i = 1; $i <= $maxLevel; $i++) { $levels[$i - 1] = floor ($current / 4); $current += floor($i+300*pow(2, ($i/9.75))); } return $levels; } First you initiate it like so $aLevels = getExperienceByLevel(99); then to see how much EXP you need to get to level 6 you do this echo $aLevels[5]; since it's an array. Now I'm trying to do reverse. Get