How to create html list from such array ?



I've got an example array like this:

$myArr = array(
array("jj", "0", "jjj"),
array("ee", "0", "eee"),
array("bb", "ee", "bbb"),
array("ll", "ee", "lll"),
array("ff", "0", "fff"),
)

Where each row is an array with columns: id of list element, id of parent
list element ("0" means main node) and content of the element. So, from my
array I'd like to create a list like this:

<ul>
<li>jjj</li>
<li>eee
<ul>
<li>bbb</li>
<li>eee</li>
</ul>
</li>
<li>fff</li>
<ul>

Could anybody help me ?

Best regards.
LP


.



Relevant Pages

  • Re: Newbie on the lose.. How to add an unknown length dataset to an array
    ... a loop, exiting if endfile, otherwise allocating a new list element and ... Having read all the data into the list, I know the size of the array ... the total computing time anyway:) ...
    (comp.lang.fortran)
  • Re: Newbie on the lose.. How to add an unknown length dataset to an array
    ... I learning fortran at the moment as part of my physics study, ... allocatable array scheme, something like: ... a loop, exiting if endfile, otherwise allocating a new list element and ... I allocate it, then work down through the list, ...
    (comp.lang.fortran)
  • Re: Newbie on the lose.. How to add an unknown length dataset to an array
    ... Although the "pointer method" is elegant and requires only one array ... allocation, it does require enough virtual memory to hold twice the ... a loop, exiting if endfile, otherwise allocating a new list element and ...
    (comp.lang.fortran)
  • Re: Split not acting the way I want it to
    ... want to pull the last octet off of an IP address and print it to ... Type of arg 1 to pop must be array at ./oct.pl line 8, ... $ perl -le' ... Or, as others have suggested, just access the last list element: ...
    (perl.beginners)
  • Re: Scope of Variant / Array
    ... Even though you declared the array "public" in the main (parent) form, ... a form code module is the same as a class module. ... Constants, fixed-length strings, arrays, user-defined types and Declare ...
    (microsoft.public.access.formscoding)