I have a multidimensional array which looks like this:
Array
(
[0] => Array
(
[0] => Array
(
I'm not going to write code because I agree with deceze.
Nonetheless, my recommendation would be a custom function that:
Given your specific requirements isn't a single, magical PHP function that does this. Yet, there are dozens of PHP array functions you could utilize within your custom function.
If you need help on a particular piece, update your post or ask a new question.