Following code will show you how to find floor and ceiling values of a floating number. To find floor you can use the php function floor() and ceil() to find ceiling value.
<?php
//examples of floor()
echo floor(7.2); // 7
echo '<br>';
echo floor(7.9); // 7
echo '<br><br>';
echo ceil(7.2); // 8
echo '<br>';
echo ceil(7.9); // 8
?>
No comments:
Post a Comment