You should probably do this in a database (or XML file, or something structured). You could do it by hand, it'd just be long.
Using a database, you could specify something like this:
ID_LVL | MinExp | MaxExp | Attack | Defense |
1 | 0 | 39 | 5 | 2 |
2 | 40 | 89 | 6 | 3 |
3 | 90 | 159 | 7 | 4 |
... | ... | .... | ... | ... |
Then just query the database with something like:
SELECT *
FROM `levels`
WHERE MinExp <= '$currentexperience'
AND MaxExp >= '$currentexperience'