Examveda

Arrays cannot have associative indices in PHP.

A. True

B. False

Answer: Option B

Solution (By Examveda Team)

This question is about how PHP handles arrays and associative indices.
Let's break it down:
* Arrays in PHP: Arrays are like containers that hold multiple values. Think of them like a list or a collection.
* Associative Indices: Associative indices let you use descriptive keys (like words) instead of just numbers to access values within an array. It's like using a dictionary where you look up a word (key) to find its meaning (value).
Now, the question asks if arrays in PHP can't use these descriptive keys. The answer is False.
PHP does support associative indices in arrays. This makes it very flexible for organizing data.
Example:
Imagine you want to store information about a person:
```php $person = array( "name" => "Alice", "age" => 30, "city" => "New York" ); ```
Here, we're using "name", "age", and "city" as keys to store Alice's details.
So, the correct answer is Option B: False.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous