sareef sareef - 1 month ago 7
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);