Home | | Computer Application 12th Std | Variable in PHP

PHP (Hypertext Pre-Processor) - Variable in PHP | 12th Computer Applications : Chapter 4 : Introduction to Hypertext Pre-Processor (PHP)

Chapter: 12th Computer Applications : Chapter 4 : Introduction to Hypertext Pre-Processor (PHP)

Variable in PHP

PHP has variables like other programing languages such as C, C++ and Python etc.

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.


Basic Rules for Variable Declaration

• Variable name must always begin with a $ symbol.

• Variable name can never start with a number.

• Variable names are case-sensitive.


Example:

$a=5; $b=10;

$a_1=”Computer Application”

$c=$a+$b;

echo $

Tags : PHP (Hypertext Pre-Processor) , 12th Computer Applications : Chapter 4 : Introduction to Hypertext Pre-Processor (PHP)
Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
12th Computer Applications : Chapter 4 : Introduction to Hypertext Pre-Processor (PHP) : Variable in PHP | PHP (Hypertext Pre-Processor)


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.