adspace


What is the difference between indexed and associative array?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Which variable declarations within a class is invalid in php?

1052


List some features of php that are deprecated in php7?

1026


What is the current stable version of php?

1130


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

1082


if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer

1997


Tell me what kind of things have you done on the social side?

1071


What is difference between static and final in php?

1114


how to detect a mobile device using php

1177


Write a program using while loop?

1128


Name and explain five of the PHP error constants?

1043


What is the current stable version of php? What advance thing in php7?

1100


How to calculate the difference between two dates using php?

1151


What sized websites have you worked on in the past?

1092


What is trait in php?

1072


Explain me is it possible to destroy a cookie?

1035