php tutorial - PHP Data Types - php programming - learn php - php code - php script
- The main approach of data types is to store the data in the PHP program by using a variable.
- PHP supports the following data types:

Scalar types :
- boolean
- integer
- float
- string

Compound types :
- array
- object
Special types :
- resources
- NULL
Boolean values :
- Boolean is the simplest data type. It’s like a switch that has only two states ON means true(1) and OFF means false(0).
Syntax :
$x = true;
$y = false;
click below button to copy the code. php tutorial - team
Integers :
- Integer means numeric data types. A whole number with no fractional & decimal component will be there.
- Integer may be lesser than or greater than or sometimes equals to zero.
php tutorials Syntax :
<?php
$x = integer;
var_dump($x);
?>
click below button to copy the code. php tutorial - team
Floating point numbers :
- A floating point number is a number with a decimal point or a number in exponential form.
php programming Syntax :
<?php
$x = float;
var_dump($x);
?>
click below button to copy the code. php tutorial - team
Strings :
- A string is series of characters, where a character is the same as a byte.
- This means that PHP only supports a 256-character set, and hence does not offer native Unicode support.
php programming Syntax :
<?php
$x = “String Statement”;
?>
click below button to copy the code. php tutorial - team
Array :
- An array stores several values in one single variable.
php programming Syntax :
<?php
$arrayname = array("array1","array2","array3");
?>
click below button to copy the code. php tutorial - team
Object :
- An object is a data type which stores data and information on how to process that data.
Resources :
- The resources are special variables that holds the references to resources which is external to PHP such as database connections.
NULL :
- The NULL is defined as a special variable. Mostly, the data type which means non existent or not known or else empty.
php programming Syntax :
<?php
$my_var = NULL;
?>
click below button to copy the code. php tutorial - team
Related Searches to php data types
types of php frameworks data types in php pdf how php and html work together? php variable type declaration operators in php var_dump in php php object array type casting in php how php and html work together PHP tutorials how to become a php developer online php classes online php course online php courses php.com php-development php-help phpmyadmin sql php tutorial for beginners tutorial php php website learn php online php programs php programming language php online course php mysql tutorial php example php training php source code php 7 tutorial tutorialspoint php php url script php advanced php tutorial php web development php javascript php ajax tutorial php lernen php code generator php for dummies php developer online php classes online php course php developer course php development tutorials php tutorial for beginners pdf php programming language php server script php website project phpmyadmin sql programing php php programming courses php training course php tutorial classes php tutorial for beginners pdf tutorial php class php tutorial for beginners with examples pdf php tutorial point php interview questions php pdf php basics php syntax php tutorial for beginners php tutorial pdf sphp tutorialAdblocker detected! Please consider reading this notice.
We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.
We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!
We need money to operate the site, and almost all of it comes from our online advertising.
Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.