PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Ravi Kumar  >  SPL Find Images  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Demo file
Class: SPL Find Images
Get images for a gallery using SPL find iterators
Author: By
Last change:
Date: 8 years ago
Size: 1,251 bytes


Class file image Download
include_once 'Gallery.php';

$gallery = new Gallery();
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>CSS3 Gallery & Lightbox</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="assets/css/demo.css">
    <link rel="stylesheet" href="assets/css/style.css">
    <div class="container">
            <h1>CSS3 <span>Gallery & Lightbox</span></h1>
            <h2>A simple CSS-only Gallery & lightbox</h2>

            <ul class="lb-album">

foreach($gallery->getImages() as $index => $image) {
$id = "image-$index";
$href = "#$id";
$full = $image['full'];
$thumb = $image['thumb'];


                    <a href="<?php echo $href;?>">
                        <img src="<?php echo $thumb;?>" alt="<?php echo $id;?>">
                    <div class="lb-overlay" id="<?php echo $id;?>">
                        <img src="<?php echo $full;?>" alt="<?php echo $id;?>" />
                        <a href="#page" class="lb-close">x Close</a>


For more information send a message to info at phpclasses dot org.