1.

Which function returns an array consisting of associative key/value pairs?(a) count()(b) array_count()(c) array_count_values()(d) count_values()I had been asked this question in examination.Origin of the question is Arrays-1 in chapter Arrays and Functions of PHP

Answer»

Correct CHOICE is (c) array_count_values()

BEST explanation: The function array_count_values() will count all the values of an array. It will return an associative array, where the keys will be the ORIGINAL array’s values, and the values are the number of occurrences.



Discussion

No Comment Found

Related InterviewSolutions