
Array_php
Quiz
•
Other
•
University
•
Practice Problem
•
Hard
iot lab
Used 2+ times
FREE Resource
Enhance your content in a minute
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
Which function is used to count all elements in an array?
Which function is used to count all elements in an array?
count()
size()
length()
array_count()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you merge two arrays in PHP?
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
16 questions
Quizizz campaña Winston 8 ene'24
Quiz
•
1st Grade - University
20 questions
INTRODUCCION WORD OFIMATICA I
Quiz
•
University
15 questions
Terapi Komplementer_Terapi Musik
Quiz
•
University
20 questions
Electrical Science Cat 3 DMEL 245
Quiz
•
University
17 questions
Questionnaire Design
Quiz
•
University
20 questions
Power Amplifier
Quiz
•
University
20 questions
Marketing Mix
Quiz
•
University
15 questions
Pre and Post Test GGL
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
