Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Not all numbers are as simple as integers. We often need to keep track of fractional values, like product that costs $1.99 or a distance like 2.5 miles. Those values are called floats, floating point values, real numbers or doubles: all names for the same thing. For decimal numbers we use the PHP variable type of Float.
Documentation
floats also known as " Floating point numbers", "doubles", or "real numbers", can be specified using any of the following syntaxes:
$a = 1.234;
$b = 1.2e3;
$c = 7E-10;
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up