PHP Data Type
Subject: Web development using PHP and MySQL
Variables can store or hold data of different types such as String, Integer, Float or double, Boolean, Array.
String is a sequence of characters or any text inside single or double quotes.
Example 1
$msg";
?>
Integer data type is a non-decimal number between -2,147,483,648 and 2,147,483,647.
Example 2
Float is a number with a decimal point or in exponential form.
Example 3
Boolean represents two (true or false) states.
Example 4
Array is use to stores multiple values in one variable for easy access and manipulation.
Example 5
What is my variable data type?
var_dump() can be use to know the data type of a variable
Example 6
By:
Benjamin Onuorah
Login to comment or ask question on this topic
Previous Topic Next Topic