Posts

Showing posts with the label Variable data Type in PHP

PHP data Type

Image
 Variable  Data Type in PHP 1] PHP String : -         Represents a sequence of characters. Example: $name = "seeta"; 2] PHP  Integer :- Represents whole numbers without decimal points. Example :- $number = 100; 3] PHP  Float :- Floating point numbers or Doubles Represents numbers with decimal points. Example :- $float_number = 9.7; 4] PHP Boolean :- Represents true or false values. Example: true; 5] PHP Array :- Represents a collection of elements, each identified by a key. Example: $colors = array("red", "green", "blue"); 6] PHP Object :- Represents instances of user-defined classes. Example: class Car { public $color = "blue"; public $make = "Toyota"; } $car = new Car(); 7] PHP NULL :- Represents a variable with no value. Example: $variable = null; 8] PHP Resource :- Represents a special variable that holds a refe...