使用递归函数来模拟多维数组

below is my array...

  Array(

    [Open+Sans] => Array
      (
        [0] => normal
        [1] => lightitalic
        [2] => light
        [3] => semibold
      )

    [Nova+Script] => Array
      (
        [0] => normal
      )

    [Nova+Slim] => Array
      (
        [0] => normal
      )

    [Old+Standard+TT] => Array
      (
        [0] => normal
      )
  )

I want the keys to be imploded with | and child array to be imploded with commas, the final expected string will be like below:

Open+Sans:normal, lightitalic,light,semibold | Nova+Script:normal | Nova+Slim:normal | Old+Standard+TT:normal

thanks for your time..

Ich guess this should work

$output;
foreach($input_array as $k => $v){
    output.= $k.":";
    output.= implode(",",$v);
    output.= "|";
}