Variable
in PHP
PHP has variables like other programing languages
such as C, C++ and Python etc. Variables are the storage location, which can
store the values for the later manipulations in the program.
The variable in PHP begins with a dollar ($) symbol
and the assignment activity implemented using “=” operator, finally the
statement ends with semi colon “;” The semicolon indicates the end of
statement.
The main advantage of the PHP variable declaration
is, it does not requires to specify the data type keyword separately such as
int, char, float, double or string etc.
• Variable name must always begin with a $ symbol.
• Variable name can never start with a number.
• Variable names are case-sensitive.
$a=5; $b=10;
$a_1=”Computer Application”
$c=$a+$b;
echo $
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.