Troubles displaying an associative array with PHP and HTML

Posted by Psyche on Stack Overflow See other posts from Stack Overflow or by Psyche
Published on 2010-05-22T15:51:56Z Indexed on 2010/05/22 16:00 UTC
Read the original article Hit count: 122

Filed under:

Hello,

I have the following HTML code:

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

I also have a PHP array with news (title an url) and I would like to know how can I repeat that code inside [repeating structure] and display 3 different news for each repeating structure.

Thank you.

© Stack Overflow or respective owner

Related posts about php