
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
Pecahan
Presentation
•
11th Grade
10 questions
บทเรียนออนไลน์ - วิทยาการคำนวณ2 ม.5 (บทที่ 1-1)
Presentation
•
11th Grade
11 questions
Abolição
Presentation
•
11th Grade
9 questions
Concave and Convex Lens
Presentation
•
11th Grade
11 questions
Fungsi menu dan ikon Microsoft Excel
Presentation
•
11th Grade
9 questions
Program Linear
Presentation
•
11th Grade
10 questions
PROGRAM LINEAR KELAS 11
Presentation
•
11th Grade
10 questions
U1L3c - A1A
Presentation
•
11th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
26 questions
SLIME!!!!!
Quiz
•
KG - 12th Grade
20 questions
Cell Transport
Quiz
•
9th - 12th Grade
20 questions
Budgeting
Quiz
•
9th - 12th Grade
20 questions
Investing
Quiz
•
9th - 12th Grade
8 questions
DNA vs. RNA
Presentation
•
9th - 12th Grade
12 questions
Identify Rigid Transformations
Quiz
•
8th - 12th Grade
10 questions
Complementary, Supplementary, Vertical, and Linear Pairs
Quiz
•
9th - 12th Grade
20 questions
Managing Credit
Quiz
•
9th - 12th Grade