
Pengenalan PHP
Presentation
•
Information Technology (IT)
•
11th Grade
•
Practice Problem
•
Hard
Abd Rohman
Used 5+ times
FREE Resource
13 Slides • 0 Questions
1
PEMROGRAMAN WEB (Php)
Oleh:
ABD ROHMAN, S.Kom., M.Pd.
2
Struktur Script PHP
Kode-kode PHP dituliskan di antara tanda berikut ini:
<?php
...
...
...
?>
3
PHP
PHP adalah singkatan dari "PHP: Hypertext Prepocessor", yaitu bahasa pemrograman yang digunakan secara luas untuk penanganan pembuatan dan pengembangan sebuah situs web dan bisa digunakan bersamaan dengan HTML.
4
Variabel
Variabel dalam pemrograman digunakan untuk menyimpan suatu nilai dan jika suatu
saat nilai tersebut diperlukan kembali untuk proses perhitungan, maka cukup
memanggil nama variable tersebut.
Dalam PHP, nama suatu variabel ditandai dengan tanda dollar ($).
Berikut ini adalah taks untuk menyimpan nilai ke dalam suatu variabel.
$namaVariabel = nilai;
5
Adapun beberapa aturan penulisan nama variabel adalah sebagai berikut:
• Nama variabel harus diawali dengan huruf atau underscore ( _ )
• Nama variabel hanya boleh dituliskan dengan alpha numeric a-z, A-Z,
0-9 dan underscore
• Nama variabel yang terdiri lebih dari satu kata, dapat dipisahkan dengan
underscore
6
Contoh:
<?php
$teks = "Hello World!";
$sebuah_bilangan = 4;
$bilanganYangLain = 8.567;
$teks2 = $teks;
>?
7
Assignment
•proses pemberian suatu nilai kepada suatu variabel diistilahkan ‘assignment’.
Contoh :
•<?php
•
•$teks = "Hello World!";
•$sebuah_bilangan = 4;
•$bilanganYangLain = 8.567;
•$teks2 = $teks;
•
•echo $teks;
•echo "<br />" . $sebuah_bilangan;
•echo "<br />Isi dari variabel \$bilanganYangLain : " . $bilanganYangLain;
•echo "<br />Isi dari variabel \$teks2 adalah : " . $teks2;
•
•?>
8
Contoh :
<?php
$teks = "Hello World!";
$sebuah_bilangan = 4;
$bilanganYangLain = 8.567;
$teks2 = $teks;
echo $teks;
echo "<br />" . $sebuah_bilangan;
echo "<br />Isi dari variabel \$bilanganYangLain : " . $bilanganYangLain;
echo "<br />Isi dari variabel \$teks2 adalah : " . $teks2;
?>
9
10
11
12
13
PEMROGRAMAN WEB (Php)
Oleh:
ABD ROHMAN, S.Kom., M.Pd.
Show answer
Auto Play
Slide 1 / 13
SLIDE
Similar Resources on Wayground
9 questions
2.7 Graphing Linear Inequalities
Presentation
•
12th Grade
11 questions
Menyatakan Data Dalam Bentuk Matriks
Presentation
•
11th Grade
10 questions
polinom
Presentation
•
11th Grade
9 questions
LKPD Interaktif Kalimat Fakta dan Kalimat Opini
Presentation
•
11th Grade
9 questions
Ekonomi Fase E
Presentation
•
11th Grade
12 questions
Lingkaran
Presentation
•
11th Grade
10 questions
Belum Berjudul
Presentation
•
KG
10 questions
Preparación y Conservación
Presentation
•
11th Grade
Popular Resources on Wayground
15 questions
Grade 3 Simulation Assessment 1
Quiz
•
3rd Grade
22 questions
HCS Grade 4 Simulation Assessment_1 2526sy
Quiz
•
4th Grade
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
20 questions
Math Review
Quiz
•
3rd Grade
Discover more resources for Information Technology (IT)
20 questions
Earth Day Trivia
Quiz
•
9th - 12th Grade
10 questions
Earth Day Awareness and Impact
Interactive video
•
6th - 12th Grade
5 questions
A.F/ST Quizizz Day 1
Quiz
•
9th - 12th Grade
100 questions
Biology EOC Review
Quiz
•
9th - 12th Grade
20 questions
Earth Day
Quiz
•
3rd - 12th Grade
16 questions
AP Biology: Unit 1 Review (CED)
Quiz
•
9th - 12th Grade
5 questions
G.PC/DF Quizizz Day 2
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade