We are ready to know about the data type of PHP. Plz see the code in below-
1. First make a page name datatype.php
2. Then write these code in this file.
//this tutorial is ready to check php data type
$var=”This is a variable”;
3. Then save this file.
4. And finally run this file with browser.
First I use a php variable $var and put some string. Then use a function named ‘gettype()’ and put this variable in this function and finally print this function. The expected output is ‘string’.
You can check integer, float accordingly .