Question:What will the following script output?<?php
$array = array ('3' => 'a', '1b' => 'b', 'c', 'd');
echo ($array[1]);
?>
+ ExplanationPHP starts assigning numeric keys to elements without a hard-coded key from the lowest numeric key available (even if that key is a numeric string). If you never specify a numeric key to start with, it starts from zero. In our script, however, we assigned the key '3' to the very first element, thus causing the interpreter to assign the key 4 to the third element and 5 to the last element. Note that the key '1b' is not considered numeric, because it doesn’t evaluate to an integer number. Therefore, element 1 doesn’t exist, and Answer D is correct.