PHP variables example

Variables:

$myName="Vaughan"

$myAge=18

PI is 3.1415926

Input: "My name is " . $myName . " and I am " . $myAge . " years old."

Output: My name is Vaughan and I am 18 years old.

We can also do it like this:

Input: "My name is $myName and I am $myAge years old."

Output: My name is Vaughan and I am 18 years old.

Input: 'My name is $myName and I am $myAge years old.'

Output: My name is $myName and I am $myAge years old.

Unset: My name is and I am years old. Wait, where is my name and age?