Download
    Interview Question     &Answer
Main Menu
PHP Variable@ Shwetank education.com
Definition
A variable is used to store information. Variables are used for storing values, like text strings, numbers or arrays.
Note
All variables in PHP start with a $ sign symbol.
The correct way of declaring a variable in PHP: $var_name = value;
New PHP programmers often forget the $ sign at the beginning of the variable. In that case it will not work.

Syntax-
$hello=5;
$-  sign must be start
Hello-  is a variable name
5-  is a variable value

Example
Let's try creating a variable containing a string, and a variable containing a number:
<?php
$txt="Shwetank Education!";
$x=10;
?>

Example with Output
<?php
$hello=1001;
echo "hello";
?>
1001

IT  Projects Links
M-Tech Thesis
Php Project
Java Project
Asp.Net Project
Android Project
Vb .Net Project
Html Project

------------------------------- Electronics  Project
Networking
Embedded system
Telecom
Robotics
CCNA
------------------------------- Latest IT  News


Copyright 2010-2015    shwetankeducation.com
Privacy & Terms