Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / nilsoft

ceil()
Returns the next highest integer value by rounding up value
if necessary.

<?php
echo ceil(4.3); // 5
echo ceil(9.999); // 10
echo ceil(-3.14); // -3
?>



floor()

Returns the next lowest integer value by rounding down value
if necessary.
<?php
echo floor(4.3); // 4
echo floor(9.999); // 9
echo floor(-3.14); // -4
?>

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me what the difference between the 'bitwise and' operator and the 'logical and' operator?

958


iam mca post graduate in 2010 not getting job in JAVA so iam looking for carear in php as market demand is high so it is best option to try for php or not

1856


What is use of isset function in php?

1042


What is the difference between substr() and strstr()?

1393


What are the method available in form submitting?

992


How many types of arrays are there in php?

965


What is polymorphism in oop php?

997


Should I use mysqli or pdo?

951


Is false empty php?

989


Explain php split() function.

977


What beforeFilter() is used?

1107


How can we display information of a variable and readable by human with php?

1071


What is a comment in php?

1081


How is it possible to know the number of rows returned in the result set?

1158


What are session variables in php?

1026