Searching...
Tuesday, 11 September 2012

Php Tutorial - Variables

9:19 pm

                    Php Tutorial - Variables

Php Tutorial - Variables :

1.       Variables are used for storing values like text strings , numbers , arrays , objects etc.
2.       When a variable is set it can be used again and again in your programme.
3.       All variables in php starts with a ‘$’ sign symbol.
4.       In php a variable does not need to be declared before being get.
5.       You donot have to tell php which data type the variable is.
6.       Php automatically converts the variable to the correct data type , depending on the sutiation  where we are using that variable.
<?php
$a = “India”;
$b = “tech”;
$c = $a + $b ;
Echo $c;
?>
In the above case $c value will be Zero.
7.       In php the variable is declared automatically when you use it.

 Php Tutorial - Variables

 

 


0 comments:

Post a Comment