# "round up to nearest multiple of five in php" Answerâ€™s

Only authorized users can answer the question. Please sign in first, or register a free account.

Related Search Terms

Relevant Tags Search Terms

Only authorized users can answer the question. Please sign in first, or register a free account.

Related Search Terms

Relevant Tags Search Terms

### php,function,rounding

This can be accomplished in a number of ways, depending on your preferred rounding convention:

## 1. Round to the

nextmultiple of 5, exclude the current numberBehaviour: 50 outputs 55, 52 outputs 55## 2. Round to the

nearestmultiple of 5, include the current numberBehaviour: 50 outputs 50, 52 outputs 55, 50.25 outputs 50## 3. Round up to an integer, then to the nearest multiple of 5

Behaviour: 50 outputs 50, 52 outputs 55, 50.25 outputs 55