Articles → PHP → Variables In PHP
Variables In PHP
Software Requirement
- XAMPP is installed on your machine
- Any text editor like Notepad
Prerequisite Knowledge
What Is A Variable?
How To Declare And Initialize As Variable?
- A variable name starts with a dollar ($) sign
- First character in the variable name should be either the alphabet or underscore (_)
- Numbers, alphabets, and underscore are the permissible characters in the variable name
- No special characters are allowed for variable name
- Spaces are not allowed between variables
- Variables are case sensitive
<?php
$customer_name = 'google';
?>
How To Assign Value To A Variable?
<?php
$customer_name;
$customer_name = 'google';
?>