what will do ceil() and floor() in PHP?

Answer Posted / saurabh rastogi

$var=7.5;
$c_var=ceil($var);

echo $c_var; // Outputs 8


$var=7.5
$c_var=floor($var);

echo $c_var; // Outputs 7

Is This Answer Correct ?    29 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is traits? How it is used in php?

559


When is a conditional statement ended with an endif?

529


Is php required for wordpress?

515


What is prepare in php?

530


How to download files from an external server with code in php?

496






What is $_ request?

532


What is self in php?

561


Can you specify the "new line" character in single-quoted strings?

550


What is the difference between mysqli_fetch_object() and mysqli_fetch_array()?

523


What is a php web application?

505


What is the difference between explode() and split() functions?

507


What is difference between isset and empty in php?

542


How can cross site request forgery csrf be prevented?

489


Is python easier than php?

547


What is split function in php?

518