
latihan PHP tahap 2

Quiz
•
Computers
•
11th Grade
•
Medium
Fajar Nugraha
Used 2+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 4 pts
Apa fungsi dari echo dalam PHP?
2.
MULTIPLE CHOICE QUESTION
45 sec • 4 pts
Fungsi dari foreach ($data as $row) dalam kode tersebut adalah…
Melakukan iterasi pada setiap elemen array $data
Menampilkan semua data dalam satu baris
Membuat array baru berdasarkan $data
Memfilter data yang ditampilkan
3.
MULTIPLE CHOICE QUESTION
45 sec • 4 pts
Apa hasil dari kode berikut?
$nama = "Budi"; echo "Selamat datang, $nama!";
4.
MULTIPLE CHOICE QUESTION
45 sec • 4 pts
Fungsi date("Y") dalam PHP akan menampilkan…
5.
MULTIPLE CHOICE QUESTION
45 sec • 4 pts
Apa output dari kode berikut jika hari ini adalah Senin?
echo "Hari ini adalah " . date("l");
6.
MULTIPLE CHOICE QUESTION
45 sec • 4 pts
Bagaimana cara mengubah kode agar nilai A diberikan untuk skor 85 ke atas?
Mengubah if ($skor >= 90) menjadi if ($skor >= 85)
Mengubah elseif ($skor >= 75) menjadi elseif ($skor >= 85)
Menambah elseif ($skor >= 85) { echo "Nilai Anda A"; }
Menghapus kondisi elseif ($skor >= 75)
7.
MULTIPLE CHOICE QUESTION
45 sec • 4 pts
Bagaimana menampilkan waktu saat ini dalam format HH:MM:SS?
echo time();
echo date("H:i:s");
echo now();
echo datetime();
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Understanding Input and Output Devices

Quiz
•
7th Grade - University
20 questions
PTS Informatika X E3

Quiz
•
10th Grade - University
20 questions
Uji Pengetahuan Basisdata

Quiz
•
11th Grade - University
20 questions
UTS Basis Data

Quiz
•
11th Grade
20 questions
Membuat Video Perjalanan

Quiz
•
11th Grade
20 questions
Array

Quiz
•
10th - 12th Grade
20 questions
Pemrograman Web (Edisi 1)

Quiz
•
9th - 12th Grade
20 questions
ULANGAN BASIS DATA

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade