Encode a multidimensional array
This is how you can encode the values of an multidimensional array using two functions. You could of course optimize it to one, by moving the mb_convert_encoding-function into the first condition of the convert2encodingRecursive-function. But in my case I needed the string converter as well.