PHP Taskbook Level 9.10
Write code that will determine the maximum nesting level of a multidimensional array.
Given an arbitrary two-dimensional array:
[
[11, 32, 13, 44, 55],
[31, 42, 53, 66, 75],
[12, 26, 33, 45, 52],
[15, 22, 35, 64, 57],
[21, 52, 32, 44, 38],
]
Find the maximum and minimum elements and swap them.
Let the database store a table with countries of the following type:
| id | name |
|---|
Let the database also store a table with cities of the following type:
| id | name | country_id |
|---|
Using the data from these tables, you will get an array of the following type:
[
'country1': [an array of cities in this country],
'country2': [an array of cities in this country],
'country3': [an array of cities in this country],
]