Php Tags

Hello

Tuesday, 1 September 2015

Data Type In Php


The Foll data type are

Integer - Stores numbers without decimal points. The value ranges from -2,147,483,648 to +2,147,483,647 
Floating-point - Stores floating-point numbers 
String - Stores a set of characters. It is enclosed within single quotes or double quotes 
Boolean - Stores one of the two values, True or False 
Objects - Uses for any object reference 

Declares automatically at the time of initializing the variable 
As the value of the variable keeps on changing, the data type of the variable also keeps on changing 
denoted  with a dollar ($) symbol and then the variable name 
Declares with the data type of which the value will stored in it 
Variables are case sensitive in php
For example, a variable name, $var_name, is different from a variable name, $Var_Name 

<?php
   $num1 = 20;
   $num2 = 10;
   $tot = $num1 + $num2;
   
   print("$num1 + $num2 = $tot <

No comments:

Post a Comment