Php Floor Function
Besides the built in php functions it is possible to create your own functions.
Php floor function. In reply to glen who commented. The floor function works in the inverse of the ceil this rounds the fractional values down. To go lower the floor function would go to 2 which is logically less than 1 6. This function accepts any float number as argument and rounds it down to the next lowest integer.
To round a floating point number look at the round function. Php user defined functions. A function is a block of statements that can be used repeatedly in a program. The floor function is another in built function in php iterpreter.
The floor function rounds a number down to the nearest integer if necessary and returns the result. The floor function converts the given numeric value to the next lower integer. The result will be rounded to 2. If we take the same example previously described we will have the following results.
Glen 01 dec 2007 04 22 php echo floor 1 6. A function will not execute automatically when a page loads. This function always returns a float number as range of float is bigger than that of integer. Floor value of 10 is 10 floor value of 111 13 is 112 floor value of 100 01 is 100 floor value of 200 is 200.
View the example in the browser. See example of php floor function. It accepts only a single parameter number that is the nearest integer. The result will be rounded to 7.
What is php floor function. Php floor function is used to round a given input number down to the nearest integer. A function will be executed by a call to the function. Will the result be rounded.
To round a number up to the nearest integer look at the ceil function. Will output 1.