Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

How we use ceil() and floor() function in PHP?
ceil() is use to find nearest maximum values of passing value.
Example:
$var=6.5;
$ans_var=ceil($var);
echo $ans_var;
Output:
7
floor() is use to find nearest minimum values of passing value.
Example:
$var=6.5
$ans_var=floor($var);
echo $ans_var;  
Output:
6