Good day. Can not catch up with how to do. An array is formed dynamically. He may be so
one.
[f_i] => Array ( [1] => Array ( [1] => fld_img [2] => page [3] => article ) [2] => 0 ) 2
[f_i] => Array ( [1] => 0 [2] => 0 3
[f_i] => Array ( [1] => 0 [2] => Array ( [1] => fld_img2 [2] => page [3] => article ) ) Took only two keys and 4 states. I need to convert an array to such a view.
If value == 0, then do not touch. If the value is an array, then the value is equal to the key. That is, it should work, so in the first case.
one.
[f_i] => Array ( [1] => 1 [2] => 0 ) Thank you in advance.