In PHP, Variables are like buckets
Variables are used to store information like numbers, text, images, logic
The stored information are for later use
The basic syntax for a variable is $variable_name="my first variable" where my first variable is the content of the variable "variable_name"
There are 4 basic types of variables and each holds specific information
Refer to Procedure below
1.Open text editor
2.Create a new File / script (Right Click your working folder > New File > Name of file.php > Input all HTML tags)
3.Enter the following PHP codes between the PHP tag
< ?php
$myname = "Charles";
$myage = "40";
$favcolour = "blue";
To display these variables on a page, we use the PHP function "print"
print("My name is $myname! < br> I am $myage years old, and like the colour $favcolour.");
?>
Output: My name is Charles!
I am 40 years old, and like the colour blue.