Frage

The following code is the way to display all images from specific gallery ID and it works!

global $nggdb;
$gallery = $nggdb->get_gallery(8, 'sortorder', 'ASC', true, 0, 0);
foreach($gallery as $image) {
    echo $image->imageURL;
    echo $image->alttext;
    echo $image->description;
 }

but what I want is to show all images from multiple album ID? anyone can help me? please...

War es hilfreich?

Lösung

Try this

global $nggdb;
foreach($ids as $id) {
$gallery = $nggdb->get_gallery($id, 'sortorder', 'ASC', true, 0, 0);
        foreach($gallery as $image) {
            echo $image->imageURL;
            echo $image->alttext;
            echo $image->description;
         }
 }
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top