Advertisements
Advertisements
प्रश्न
Explain Array concepts and their types.
संक्षेप में उत्तर
Advertisements
उत्तर
Array is a concept that stores more than one value of same data type (homogeneous) in a single array variable. They are 3 types of array concepts in PHP.
- Indexed Arrays:
Arrays with a numeric index for the available values in array variable which contains key value pair as user/developer can take the values using keys. - Associative Arrays:
- Associative arrays are a key-value pair data structure.
- Instead of having storing data in a linear array, with associative arrays you can store your data in a collection and assign it a unique key which you may use for referencing your data.
- Multidimensional Arrays
- A multidimensional array is an array containing one or more arrays.
- PHP understands multidimensional arrays that are two, three, four, five, or more levels deep.
- However, arrays more than three levels deep are hard to manage for most people.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
