-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path3.php
More file actions
62 lines (51 loc) · 1.23 KB
/
3.php
File metadata and controls
62 lines (51 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
// ===================
// Tipe data dalam php
// ===================
// 1. String
// 2. integer
// 3. Float
// 4. Boolean
// 5. array
//contoh tipe data "String" yang berisikan teks
echo "contoh tipe data String: ";
echo "<br/>";
$tekssatu = "teks satu";
$teksdua = "teks dua";
echo $tekssatu;
echo "<br/>";
echo $teksdua;
echo "<br/>";
//contoh tipe data "integer" yang berisikan bilangan asli atau bulat
echo "contoh tipe data Integer: ";
echo "<br/>";
$integer_satu = 1;
$integer_dua = 2;
echo $integer_satu;
echo "<br/>";
echo $integer_dua;
echo "<br/>";
//contoh tipe data "Float" yang berisikan bilangan desimal
$float_satu = 2.09;
$float_dua = 123.456;
echo $float_satu;
echo "<br/>";
echo $float_dua;
echo "<br/>";
//contoh tipe data "Boolean" yang berisikan value true or false
$boolean_satu = true;
$boolean_dua = false;
echo $boolean_satu;
echo "<br/>";
echo $boolean_dua;
echo "<br/>";
//contoh tipe data "Array" yang mempunyai penyimpanan banyak variabel
$array_satu = array("DPM","BEM","SENADA");
//$array_dua = array("Braincode","DSC","NETS","MUDENG");
echo $array_satu[0];
echo "<br/>";
echo $array_satu[1];
echo "<br/>";
echo $array_satu[2];
echo "<br/>";
?>