Display all images.

  • twkh

    #1578

    Hi there. How do I display all images from a folder in a post.

    I tried using

    <?php
    $files = glob("images/*.*");
    for ($i=1; $i<count($files); $i++)
    {
    $num = $files[$i];
    echo '<img src="'.$num.'" alt="random image" />'."  ";
    }
    ?>

    but it does not link well…. any solutions guys…

    Ricardo

    #16340

    I would recommend the NextGEN Gallery plugin.

    twkh

    #16341

    because i am creating something like a directory of hotel images… i want to call the image straight from the folder/directory… instead of using nextgen where i have to import all the images… we’re talking about 100000 images…

    ie.. http://www.example.com/variable1/variable2/*.jpg

    Mod

    Kenneth John Odle

    #16342

    Moved to Support in order to comply with the forum rules.

    I also use the Piwigo plugin, because I use the Piwigo gallery on my main website. It is very easy to include pictures from my gallery on my blog. I haven’t done much with it yet because I haven’t had the time, but will in the next few months.

    Other than that, the plugin mentioned above is widely used.

    Ken

    Admin

    Syahir Hakim

    #16343

    What’s wrong with the link? Also, please provide the URL to your site.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!