php - Recursion function over multidimensional array
I have an array and in this array are 3 arrays with attributes, sometimes the array can have more or less..
Array (  => Array (  => XS  => S  => M  => L  => XL )  => Array (  => Black  => Red  => Green )  => Array (  => Fitted  => Not Fitted ) )
And would like to then echo out recursively..
XS Black Fitted XS Black Not Fitted XS Red Fitted XS Red Not Fitted XS Green Fitted XS Green Not Fitted S Black Fitted S Black Not Fitted S Red Fitted S Red Not Fitted S Green Fitted S Green Not Fitted M Black Fitted ... And so on
I do have code but nothing workable to show anything meaningful. Recursion confuses me and can't seem to produce a recursive function in a way that will produce this.. Any help would be appreciated :)