adplus-dvertising
frame-decoration

Question

Which of the following are correct ways of creating an array?

i) state[0] = “karnataka”;
ii) $state[] = array(“karnataka”);
iii) $state[0] = “karnataka”;
iv) $state = array(“karnataka”);

a.

iii) and iv)

b.

ii) and iii)

c.

Only i)

d.

ii), iii) and iv)

Posted under PHP

Answer: (a).iii) and iv)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following are correct ways of creating an array? i) state[0] = “karnataka”; ii) $state[] = array(“karnataka”); iii) $state[0] = “karnataka”; iv) $state =...