I am working with an array such as the following and I'd like to set all the "price" keys, that have no value, to 0.
How can I achieve this, if the depth of the array is infinite?
Big thanks!
Array
(
[0] => Array
(
[random_key0] => Array
(
[name] => Foo
[price] => 25
)
[random_key1] => Array
(
[name] => Bar
[price] =>
)
[1] => Array
(
[name] => 125
[price] =>
)
[2] => Array
(
[another_key0] => Array
(
[name] => Foo
[options] => Options here
[special0] => Array
(
[name] => Special Name
[price] =>
)
[special1] => Array
(
[name] => Special 2
[price] => 120
)
)
)
)