Is there a way to print an <ul><li> tree recursively with PHPTal, that is, 
without knowing the exact number of levels in my associative array


Say I have 

$phptal->myarray = Array
(
    [bar] => 
    [baz] => Array
        (
            [bop] => Array
                (
                    [0] => file4.txt
                )

            [0] => file2.txt
            [1] => file3.txt
        )

    [0] => file1.txt
)

and I'd like to produce:

<ul>
        <li>Bar</li>
        <li>Baz
                <ul>
                        <li>Bop
                                <ul>
                                        <li>File4.txt</li>
                                </ul>   
                        </li>
                        <li>file2.txt</li>
                        <li>file3.txt</li>
                </ul>
        <li>file1.txt</li>
</ul>


                        


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

Reply via email to