PHP Arrays
Which of the following are correct ways of creating an array?
1. state[0] = “karnataka”;
2. $state[] = array(“karnataka”);
3. $state[0] = “karnataka”;
4. $state = array(“karnataka”);

3 and 4
2 and 3
Only 1
2, 3 and 4

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$a=array("A","Cat","Dog","A","Dog");
$b=array("A","A","Cat","A","Tiger");
$c=array_combine($a,$b);
print_r(array_count_values($c));

Array ( [A] => 5 [Cat] => 2 [Dog] => 2 [Tiger] => 1 )
Array ( [A] => 2 [Cat] => 1 [Dog] => 4 [Tiger] => 1 )
Array ( [A] => 2 [Cat] => 2 [Dog] => 1 [Tiger] => 1 )
Array ( [A] => 6 [Cat] => 1 [Dog] => 2 [Tiger] => 1 )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
There are three different kind of arrays:

Numeric array, Associative array, Dimensional array
Numeric array, Associative array, Multidimensional array
Const array, Associative array, Multidimensional array
Numeric array, String array, Multidimensional array

ANSWER DOWNLOAD EXAMIANS APP