Associative Arrays in PHP
The associative arrays are very similar to numeric arrays in term of functionality but they are different in terms of their index. Associative array will have their index as string so that you can establish a strong association between key and values.
To store the ages of people in an array, a numerically indexed array would not be the best choice. Instead, we could use the people names as the keys in our associative array, and the value would be their age.
To store the ages of people in an array, a numerically indexed array would not be the best choice. Instead, we could use the people names as the keys in our associative array, and the value would be their age.
June 13, 2021
phparray