PHP Programming Quiz 2

PHP Programming Quiz 2

University

14 Qs

quiz-placeholder

Similar activities

Pemrograman & Aplikasi Mikrokontroler (Pengenalan IDE)

Pemrograman & Aplikasi Mikrokontroler (Pengenalan IDE)

11th Grade - University

10 Qs

Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

University

14 Qs

Advanced Arrays Quiz

Advanced Arrays Quiz

University

19 Qs

Understanding Arrays and Functions

Understanding Arrays and Functions

University

15 Qs

CSA Africa Python Workshop

CSA Africa Python Workshop

University

10 Qs

Intro to DSA

Intro to DSA

University

15 Qs

codingม.ปลาย

codingม.ปลาย

12th Grade - University

15 Qs

Introduction to Computer Programming

Introduction to Computer Programming

University

11 Qs

PHP Programming Quiz 2

PHP Programming Quiz 2

Assessment

Quiz

Information Technology (IT)

University

Medium

Created by

Abdoulkarem Abdoullahi

Used 3+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the if...else statement in PHP?

To execute code based on a condition

To create a loop

To define an array

To include files

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is used to execute one of many blocks of code?

if statement

while loop

switch statement

for loop

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the foreach loop do in PHP?

Loops through each element in an array

Loops through a block of code a specified number of times

Executes code at least once

Executes code while a condition is true

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for a while loop in PHP?

foreach ($array as $value) { code }

for (init; test; increment) { code }

do { code } while (condition)

while (condition) { code }

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to collect values from a form with method='get'?

$_REQUEST

$_GET

$_POST

$_COOKIE

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the maximum data size limit for the GET method?

1024 characters

4096 characters

No limit

2048 characters

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of array uses named keys in PHP?

Simple array

Indexed array

Associative array

Multidimensional array

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?