PHP Arrays Quiz

PHP Arrays Quiz

University

59 Qs

quiz-placeholder

Similar activities

PHP-Midterm Exam

PHP-Midterm Exam

University

60 Qs

Practice Quiz

Practice Quiz

University

60 Qs

BCS Software Languages

BCS Software Languages

12th Grade - University

59 Qs

UJIAN MID SEMESTER PEMROGRAMAN DASAR

UJIAN MID SEMESTER PEMROGRAMAN DASAR

University

60 Qs

CS8392 - Object Oriented Programming - Unit 1

CS8392 - Object Oriented Programming - Unit 1

University

63 Qs

ITEDAT Midterm Exam

ITEDAT Midterm Exam

University

60 Qs

PHP Basics

PHP Basics

University

54 Qs

JavaScript -MIDTERM EXAM

JavaScript -MIDTERM EXAM

University

60 Qs

PHP Arrays Quiz

PHP Arrays Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Daniel Bajulaiye

Used 1+ times

FREE Resource

59 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do arrays in PHP combine the characteristics of?

Lists and objects

Regular arrays and hashes

Strings and integers

Functions and variables

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can elements in a PHP array be indexed?

By functions only

Numerically only

By strings only

Both numerically and by strings

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Are elements in a PHP array maintained in any particular order?

Yes, always in ascending order

Yes, always in descending order

No, they are not maintained in any particular order

Only when indexed by strings

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Conceptually, what are the elements of an array in PHP?

Key/value pairs

Value/value pairs

Key/key pairs

Index/index pairs

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a way to create an array in PHP?

By using the 'list' function

By assigning a value to an element of an array

By declaring a variable without initializing it

By using the 'object' keyword

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What PHP function is used to create an array as shown in the learning material?

create()

new_array()

array()

collect()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is a numerically indexed array created in PHP as per the example in the learning material?

$mixed = array('23', 'xiv', 'bob', '777')

$mixed = array(23, 'xiv', 'bob', 777)

$mixed = [23, 'xiv', 'bob', 777]

$mixed = {23, 'xiv', 'bob', 777}

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?