Floats In PHP7
Floats are numbers too but they contain decimal points. They like integers do not get quotes like strings. Here is an example of a float.
<?php $var=2.5; var_dump($var); ?>
This is the result.
float(2.5)
When Would I Use A Float In PHP7?
You would use a float in PHP7 when you are doing math as well. You may have a float returning from a database query and need to do something with it. This will come in handy when you are making calculations for checkout processes.
PHP7 DATA TYPES INTEGERS FLOATS STRINGS BOOLEAN LESSON 10 was last modified: October 29th, 2021 by
A1WEBSITEPRO Social Media Pages
Here are my social media pages, lets hook up!