How to format the number in php by removing the fractions

0

I've put the code below just to understand what I want

I want the following to be the 27.588877333333 value only print 27 removing the remaining numbers how could I do this with php

<?php
    $numero = 27.588877333333;
    echo number_format($numero, 0, '', '');
?>
    
asked by anonymous 26.12.2017 / 21:56

1 answer

0

Use the ceil function:

<?php
    $numero = 27.588877333333;
    echo ceil($numero);
?>
    
26.12.2017 / 22:18