In this tutorial I will explain how to create php variables. Before creating example program I will give you brief explanation of variables.
Variables which stores values, numbers, etc.
In PHP, a variable starts with the $ sign.
Like c program or c++ programmin no need to define variable data types in php.
Now I will create one string variable.
$txt = “Hello world!”;
When you quote double quotes to the text value that becomes string variable.
Now I will create one integer variable.
$number1 = 5;
Now I will create floating point variable.
$number2 = 10.5;