Quiz-4: Function & Array

Quiz-4: Function & Array

University

15 Qs

quiz-placeholder

Similar activities

Labor Relations and Negotations 1

Labor Relations and Negotations 1

University - Professional Development

15 Qs

HOW TO GIVE DIRECTIONS

HOW TO GIVE DIRECTIONS

10th Grade - Professional Development

12 Qs

Red Queen

Red Queen

KG - University

10 Qs

Neurotransmitter

Neurotransmitter

University - Professional Development

15 Qs

Les endroits dans la ville

Les endroits dans la ville

7th Grade - University

19 Qs

UTAR Industrial Session

UTAR Industrial Session

University - Professional Development

15 Qs

Introduction to Hemostasis Quiz 1

Introduction to Hemostasis Quiz 1

University

20 Qs

Discounted Room rates

Discounted Room rates

University

10 Qs

 Quiz-4: Function & Array

Quiz-4: Function & Array

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

Vikash Sawan

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct way to declare an array in PHP?

array()

array[]

array{}

array<>

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code? $fruits = array('apple', 'banana', 'orange'); echo $fruits[1];

orange

banana

apple

grape

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code? $numbers = array(1, 2, 3, 4, 5); echo count($numbers);

3

2

5

1

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which function is used to remove the last element from an array in PHP?

array_push()

array_shift()

array_slice()

array_pop()

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which function is used to sort an array in ascending order in PHP?

sort

ksort

asort

rsort

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How to define a function in PHP?

function {function body}

data type functionName(parameters) {function body}

functionName(parameters) {function body}

function functionName(parameters) {function body}

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Total looping techniques supported by PHP are?

1

2

3

4

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?