Array_php

Array_php

University

20 Qs

quiz-placeholder

Similar activities

PPPK TAHAP 2 PASTI LOLOS

PPPK TAHAP 2 PASTI LOLOS

University

20 Qs

Quiz SMANSALA

Quiz SMANSALA

University

20 Qs

HRM - Quiz 1

HRM - Quiz 1

University

20 Qs

INTRODUCCION WORD OFIMATICA I

INTRODUCCION WORD OFIMATICA I

University

20 Qs

Terapi Komplementer_Terapi Musik

Terapi Komplementer_Terapi Musik

University

15 Qs

Bases moleculares y cromosómicas de la herencia

Bases moleculares y cromosómicas de la herencia

University

20 Qs

Quizz Kuy!! Menang Hadiah Lo! Asik!

Quizz Kuy!! Menang Hadiah Lo! Asik!

KG - Professional Development

15 Qs

Questionnaire Design

Questionnaire Design

University

17 Qs

Array_php

Array_php

Assessment

Quiz

Other

University

Practice Problem

Hard

Created by

iot lab

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a numeric array in PHP?

$arr = ['apple', 'banana', 'cherry'];

$arr = [1 => 'apple', 2 => 'banana', 3 => 'cherry'];

$arr = ['a' => 'apple', 'b' => 'banana', 'c' => 'cherry'];

$arr = [1, 2, 3, 4];

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which PHP function is used to create an associative array?

array()

array_assoc()

assoc_array()

array_associative()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to access a multi-dimensional array element?

$array[0][1]

$array{0}{1}

$array[0->1]

array[0][1]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a multi-dimensional array?

$arr = [1, 2, 3, 4];

$arr = [['apple', 'banana'], ['orange', 'grapes']];

$arr = [1 => 'apple', 2 => 'banana'];

$arr = ['name' => 'John', 'age' => 30];

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the array_key_exists() function check in an associative array?

If the array is empty

If a key exists in the array

If the value exists in the array

If the array is sorted

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which function is used to count all elements in an array?

count()

size()

length()

array_count()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. How do you merge two arrays in PHP?

merge($arr1, $arr2)

array_merge($arr1, $arr2)

$arr1 + $arr2

array_add($arr1, $arr2)

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?