sareef sareef - 2 years ago 65
PHP Question

How to round a number up in PHP?

I want to round number like as shown below in PHP.


  • 1.1= 2

  • 1.2= 2

  • . . . .

  • 1.8= 2

  • 1.9 =2


Answer Source
//this will round the fraction up
echo ceil(4.3);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download