Articles → PHP → Variables In PHP

Variables In PHP






Software Requirement




  1. XAMPP is installed on your machine
  2. Any text editor like Notepad

Prerequisite Knowledge





What Is A Variable?





How To Declare And Initialize As Variable?




<?php $variable_name;?>


  1. A variable name starts with a dollar ($) sign
  2. First character in the variable name should be either the alphabet or underscore (_)
  3. Numbers, alphabets, and underscore are the permissible characters in the variable name
  4. No special characters are allowed for variable name
  5. Spaces are not allowed between variables
  6. Variables are case sensitive


<?php		
$customer_name = 'google'; 		
?>



How To Assign Value To A Variable?




<?php
  $customer_name;
  $customer_name = 'google'; 
?>



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, April 25, 2013

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250