Share this link via
Or copy link
Variables are used in PHP and other programming languages to store dynamic values.
Variables can be used in any PHP program to store information.
How to create or declare a variable in PHP?
Variables are declared using $ (dolar) sign followed by _ (underscore) or alphabets.
If we want to declare a variable named First Name we can write it as: