Introduction

PHP doesn't treat all the numbers as "numbers.' Instead, it breaks them down into two groups: integers and floating-point numbers. Integers are whole numbers, such as -2, 0, 1234, etc. Floating-point numbers are decimal numbers, such as -1.23, 0.0, 3.14, etc.

Conveniently, most of the time PHP doesn't make you worry about the differences between the two because it automatically converts integers to floating-point numbers and floating-point numbers to integers. It also automatically converts from strings to numbers and ba ck.


Numbers | Introduction | Checking a Valid Number | Comparing FLoating-Point Numbers | Rounding FLoating-Point Numbers | Series of Integers | Random Numbers | Logarithms | Exponents | Formatting Numbers | Formatting Monetary Values | Printing Correct Plurals | Trigonometric Functions | Converting Between Bases
© 2008: Hann So
email: hso@voyager.deanza.edu