- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are multidimensional associative arrays in PHP? How to retrieve values from them?
Multidimensional arrays store multiple arrays whereas associative arrays store key-value pairs as data. Grouped relation between data can be stored in multidimensional associative arrays.
<?php $my_arr = array(); $my_arr['Employee'] = array( "Name" => "Joe", "Age" => "20", "Birth_date" => "2000", "Job_details" => array( "Position" => "Manager", "Salary" => "Lakhs" ) ); print_r($my_arr['Employee']['Name']); echo "\n"; echo $my_arr['Employee']['Age']; ?>
An array is defined that contains various attributes of an employee. The employee array is accessed based on the index names and the data is displayed on the console.
- Associative Arrays in PHP
- Multidimensional arrays in PHP
- What are enumerations in Java? How to retrieve values from an enum?
- Associative arrays in C++
- PHP Pushing values into an associative array?
- PHP Associative Array
- How to build dynamic associative array from simple array in php?
- Multidimensional Arrays in C
- What are sitemaps? How to create them?
- Multidimensional Arrays in C / C++
- PHP Multidimensional Array.
- How are values assigned to arrays in C#?
- What HTML forms are and how to use them?
- PHP array_push() to create an associative array?