How to assign value to integer type variable in php script programming language.
Integer variable are used to hold numeric type of values and mostly used to hold id’s in online web development. Php supports all types of variables but there is a major difference at the variable assigning process because in php server side programming language web developer doesn’t need to write variable datatype at declaring time. All you have to do is assign the values to variable with given right method. So here is the complete step by step tutorial for How to Declare integer variable in php programming language.
Note : Php supports $ symbol compulsory to declare variables so declare any variable with $. Without $ symbol web developer cannot make variables in php.
How to Declare integer variable in php programming language.
Code for one.php file.
<?php //Declaring int variable. $one = 10; $two = 10; $three = $one+$two; // Printing sum of int variable on screen. echo $three; ?>