Archive for the ‘PHP Basic’ Category

PHP Comparison Operator

To test whether two variables are different, use any one of PHP’s many comparison operators. <php // define some variables $mean = 29; $median = 40; $mode  = 29; // less-than operator // return true if  left side is less [...]


Detecting the Data Type of a Variable

To find out what type a particular variable is,PHP offers the gettype() function, which accepts  a variable or value as argument.The following example illustrates this: <?php // define variables $auth = true; $age = 27; $name = ‘Bobby’; $temp = [...]


Understanding Php Simple Data Types

Every language has different types of variables- and PHP has no shortage of choices.The language supports a wide variety of data types,including simple numeric characteristic,string and Boolean types,and more complex arrays and objects. Data Type Description Example Boolean The simplest [...]