-
Which of the following are correct ways of creating an array?
-
- $Name= array(“Ajit”);
- $name[0] = “Ajit”;
- name[0] = “Ajit”;
- $state[] = array(“Ajit”);
- Both A and B
- $Name= array(“Ajit”);
Correct Option: E
A variable name should start with $ symbol which is not present in C) and you need not put the square brackets when you use the array() constructor.