Pulling photo and photo id from sql table and displaying them in a list on a page php

So I have a sql table wich contains ID,photourl and thumbnailurl. Now I’ve written a script wich deletes the photo’s. Everything is working properly the thing is I want to display the images in a list:

like this

As you can see , I want to put the photo and the delete link into one list item.

<ul>
    <li>
        <ul>
            <li><img src="#"/></li>
            <li><a href="#"> DELETE IMAGE </a></li>
        </ul>
    </li>

    <li>
        <ul>
            <li><img src="#"/></li>
            <li><a href="#"> DELETE IMAGE </a></li>
        </ul>
    </li>
</ul>

I wrote some code but it doesn’t seem to work … it displays the photo’s vertically in a list.

<ul >
<li>
<?php
    while ($line = $db->fetchNextObject()) {
        //echo '<li>';
            echo '<ul>';
                echo '<li> <img class="thumb_image '.$line->category.'" src="'.$line->minurl.'"/> </li>';
                echo '<li>  <a href="index.php?remove=true&id='.$line->id.'">Verwijder</a> </li>';
            echo '</ul>';
        //echo '</li>';
        /*echo '<img class="thumb_image '.$line->category.'" src="'.$line->minurl.'"/> <br/> <a href="index.php?remove=true">Verwijder</a> ';
    */
    }


?>
</li>
</ul>

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories