Vidyalelo
PHP · Q41

Arrays

Programming · PHP · question 41

Q41

What will be the output of the following PHP code?

A.
Error
B.
Array ( [0] => apple [1] => mango [2] => peach )
C.
Array ( [0] => apple [1] => mango )
Answer
D.
Array ( [0] => pear [1] => orange )

Answer: Option C

Solution

Answer: Option C
Solution:
The array_splice() function removes all elements of an array found within a specified range.