Vidyalelo
PHP · Q27

Arrays

Programming · PHP · question 27

Q27

What will be the output of the following PHP code ?

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

Answer: Option A

Solution

Answer: Option A
Solution:
The array_push() function inserts one or more elements to the end of an array.