PHP-Variables and Data Types | How to Use Variables in PHP | PHP Data Types
Variables and Data Types in PHP: - To Store Different Data in a Variable. PHP supports the Following Data Types. String (String is a sequence of Characters) String can be any text inside the code exp : $name="Visually Teach"; Integer none decimal Numbers Integer formats are : Decimals Hexadecimals octal Exp: $my_Age=30; Float (Floating point number - also called double) Floating is number with decimal points / Double Numbers. exp: - $my_GPA=9.7; Boolean A Boolean represents two things : TRUE or FALSE. Booleans used in conditional testing. Exp: $x = true; $y = false; Array: - To stores multiple values in one single variable Exp: $courses=array("Graphic Application","Web Application","Digital Marketing"); When you Print: - echo $courses[0] . ", " . $courses[1] . " and " . $courses[2] . "." Array Types : - There are three types of arrays: I...