title: php array_walk multidimensional array
body: <p>I got three arrays with some kind of hierarchical predefined terms</p>
  
  <pre><code>array("fruits", "yellow", "pineapple");
  array("fruits", "yellow", "lemon");
  array("fruits", "red", "apple");
  </code></pre>
  
  <p>And I have an assoc array which has a kind of hierachy:</p>
  
  <pre><code>array('fruits'=&gt;array('red'=&gt;array('tomato')));
  </code></pre>
  
  <p>How can I push the terms of my three array at the right place that I get:</p>
  
  <pre><code>array('fruits'=&gt;array('yellow'=&gt;array('pineapple','lemon'),'red'=&gt;array('tomato','apple')));
  </code></pre>
  
  <p>Do I use array_walk? Or array_walk_recursive? 
  What should I use?</p>
  
  <p>Best, Joerg</p>