MCQs
Like many programming languages, the first element of an array has an index value of 0.
sort() function is used to sort in ascending order where as rsort() meaning reverse sort is used for sorting in descending order.
Treat states as a multidimensional array and accordingly traverse it to get the value.
As we are flipping the values, $fruits["mango"] = 0, $fruits["apple"] = 1 and so on.
A variable name should start with $ symbol which is not present in i) and you need not put the square brackets when you use the array() constructor.
A built-in function, is_array(), is available for testing an array. Its prototype follows: boolean is_array(mixed variable).
The next() function returns the array value residing at the position immediately following that of the current array pointer.
prev()
The array_search() function searches an array for a specified value, returning its key if located and FALSE otherwise.
array_push adds a value to the end of an array, returning the total count of elementsin the array after the new value has been added.