Troubles displaying an associative array with PHP and HTML
<p>I have the following HTML code:             </p>

<pre><code>&lt;div id="newsTicker"&gt;
    &lt;span class="icon news"&gt;&lt;/span&gt;
        &lt;ul&gt;
            [repeating structure]
            &lt;li&gt;
                &lt;ul&gt;
                    &lt;li&gt;&lt;a href="#"&gt;News 1&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;News 2&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;News 3&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/li&gt;               
            [/repeating structure]          
        &lt;/ul&gt;
&lt;/div&gt;&lt;!--/#newsTicker--&gt;
</code></pre>

<p>I also have a PHP array: </p>

<pre><code>Array
(
    [0] =&gt; Array
        (
            [id] =&gt; 5
            [title] =&gt; Concert Aria Urbana
            [link] =&gt; http://www.searadeseara.ro/detalii-eveniment/aria-urbana-9.html
            [date] =&gt; 2010-05-22 14:59:20
        )

    [1] =&gt; Array
        (
            [id] =&gt; 4
            [title] =&gt; Poze Tequila Party
            [link] =&gt; http://www.searadeseara.ro/detalii-galerie/tequila-party-3/
            [date] =&gt; 2010-05-22 14:58:56
        )

    [2] =&gt; Array
        (
            [id] =&gt; 3
            [title] =&gt; Psyche este utilizatorul saptamanii
            [link] =&gt; http://www.searadeseara.ro/profil/1-Psyche.html
            [date] =&gt; 2010-05-22 14:48:03
        )

    [3] =&gt; Array
        (
            [id] =&gt; 2
            [title] =&gt; Galerie foto Summer Party
            [link] =&gt; http://www.searadeseara.ro/detalii-galerie/summer-party-8/
            [date] =&gt; 2010-05-22 14:25:13
        )

    [4] =&gt; Array
        (
            [id] =&gt; 1
            [title] =&gt; Concert Massive Attack
            [link] =&gt; http://www.searadeseara.ro/detalii-eveniment/massive-attack-revin-la-bucuresti-13.html
            [date] =&gt; 2010-05-22 14:24:37
        )

)
</code></pre>

<p>I would like to know how can I repeat that code inside [repeating structure] and display 3 different news for each repeating structure. </p>

<p>The output must be like this:</p>

<pre><code>&lt;div id="newsTicker"&gt;
    &lt;span class="icon news"&gt;&lt;/span&gt;
        &lt;ul&gt;            
            &lt;li&gt;
                &lt;ul&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Concert Aria Urbana&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Poze Tequila Party&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Psyche este utilizatorul saptamanii&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/li&gt;               
            &lt;li&gt;
                &lt;ul&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Galerie foto Summer Party&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="#"&gt;Concert Massive Attack&lt;/a&gt;&lt;/li&gt;                    
                &lt;/ul&gt;
            &lt;/li&gt;

        &lt;/ul&gt;
&lt;/div&gt;&lt;!--/#newsTicker--&gt;
</code></pre>

<p>Thank you.</p>
