I have a pretty simple PHP question but I'm not sure how to do that.
I want to round to the max hundred or thousand depending on the value returned by the database.
Here are a few examples of what I need :
- DB returns the value 11, I want PHP to output 20
- DB returns the value 104, I want PHP to output 200
- DB returns the value 1404, I want PHP to output 2000
- DB returns the value 10241, I want PHP to output 11000
etc etc
I would like to create an automatic function to do that, according to the value passed.
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…