TEACHERS
GALLERY
PRICING
SIGN IN
TRY ZURU
GET STARTED
Loop
Audio
Interval:
5s
10s
15s
20s
60s
Play
1 of 12
Slide Notes
Download
Go Live
New! Free Haiku Deck for PowerPoint Add-In
Th
Share
Copy
Download
0
263
Published on Nov 22, 2015
Data Types in php
View Outline
MORE DECKS TO EXPLORE
PRESENTATION OUTLINE
1.
Data Types
PHP programming language!
Photo by
Guillaume Lemoine
2.
integer
A whole Number
Example: 1,2,3…..100
Example in php $a=68
Photo by
seagers
3.
Float/double
A number with a decimal (or floating number)
Example: 2.35, 5.4, 345.6
Example in php: $number1=6.8
Photo by
Pulpolux !!!
4.
String
This data type is a string of characters
Can be either letters or puncuations
Example Hi!
Example in php: $name="Rachel?"
Photo by
Javier Volcan
5.
Boolean
This is a true or false request
Example in php: $test= True, $test=False
Photo by
ryanmilani
6.
Array
An array is an ordered map
Consists of names or values that are mapped in values
Example in php:$cars=array("Volvo","BMW","Toyota")
Photo by
Ludovico Cera
7.
Object
A data type that contains properties and methods
Information on how to process data
Photo by
kjetikor
8.
Null
This is when a variable does not contain a value
Example in php: $x=null
Photo by
Nina Matthews Photography
9.
Loose Typing
In php we define our type of variables simply by choosing
the list just given to you.
In C programming you have to define the variable
Example in C programming: int number1;
or char lastname[30];
Photo by
kevin dooley
10.
Gettype function
If ever concerned with what data type you made a variable use gettype
Example: echo gettype($value)
This will then display to you what data type $value is
Photo by
RLHyde
11.
Changing a VARIABLE
settype() function will change a variable that you have already set
Example in php:
$a=4.657
settype($a."integer")
Result = if you were to type echo $a 4 would appear
Photo by
garryknight
12.
Thanks for watching!
BY: RACHEL RECTOR
Photo by
harold.lloyd
Friend of Haiku Deck
×
Error!