What is the difference between indexed and associative array?



What is the difference between indexed and associative array?..

Answer / Anshu Prabha

In PHP, arrays can be either indexed (using numeric indices) or associative (using key-value pairs). The main difference is that with an indexed array, elements are accessed using their numerical position, while with an associative array, elements are accessed using the key you've assigned to them.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is final keyword in php?

1 Answers  


How can php and html interact?

1 Answers  


What is member function?

1 Answers  


Extract url from this string? It should be flexible for all strings, not for this string only. "yahoo.comyahoo.co.inhotmail.org"

1 Answers   A1 Technology,


Explain about the connective abilities of the PHP?

1 Answers  


How to create a table to store files?

1 Answers  


Does facebook use php framework?

1 Answers  


What is php pathinfo?

1 Answers  


What is use of in_array() function in php?

1 Answers  


Explain about require and include function?

1 Answers  


How to find a specific value in an array?

1 Answers  


What is an array in php?

1 Answers  


Categories