I have a multilevel array, where, as the template concerns, the number of levels is unlimited.

eg
$objects = array('Food'=>array('Fruit'=>array('Red'=>array('Cherry', 'Strawberry'), 'Yellow'=>array('Banana')), 'Meat'=>array('Steak', 'Hamburger'));

I'd like to loop through this array in my templates and end up with

<ul>
<li>Food
  <ul><li>Fruit
    <ul><li>Red
      <ul><li>Cherre</li><li>Strawberry</li></ul>
    </li><li>Yellow
... etc


How could I do this, without needing to know the number of levels?


--

GRolf

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to