Vidyalelo
PHP · Q35

Arrays

Programming · PHP · question 35

Q35

What will be the output of the following PHP code?

A.
Array ( [0] => red [1] => green )
Answer
B.
Array ( [0] => green [1] => blue )
C.
Array ( [0] => red [1] => blue )
D.
Array ( [0] => blue [1] => blue )

Answer: Option A

Solution

Answer: Option A
Solution:
The array_pop() function deletes the last element of an array.