The array may look like this, and the number of keys in the next internal array may be different. At the end of checking each value, the array should look the same. It is worth considering that the value may be textual.
Array ( [0] => Array ( [year] => 2008 [faculty] => 4 [program] => 10 [...] => ... ) [1] => Array ( [agree] => on [year] => 2010 [faculty] => 47 [program] => 4 [...] => ... ) ... )
It is not necessary to write the code, it is enough to tell in words or, as a last resort, add a pseudocode to the story.
Why do I need it? It’s just interesting) I ran into it myself, I didn’t come up with a similar array of a better solution than how to go through a loop with conditional constructions ...