Home »
MCQs »
PHP MCQs
What is the difference between Indexed array and Associative array in PHP?
109. What is the difference between Indexed array and Associative array in PHP?
- Index array has numeric index while associative array has named keys
- Index array has numeric index while associative array has named keys and numeric index both
- Index array is one-dimensional array with numeric index while associative array is two-dimensional array with numeric index
- Index array has numeric index while associative array has one or more arrays
Answer: A) Index array has numeric index while associative array has named keys
Explanation:
The main difference between Indexed array and Associative Array is that - Index array has numeric index while associative array has named keys.