Skip to content

Instantly share code, notes, and snippets.

@codingwithsara codingwithsara/list.php Secret
Created Apr 5, 2019

Embed
What would you like to do?
Save Image File with PHP & MySQL - #4
<div class="modal-body">
<ol class="carousel-indicators">
<?php for ($i = 0; $i < count($images); $i++): ?>
<li data-target="#lightbox" data-slide-to="<?= $i; ?>" <?php if ($i==0) echo 'class="active"'; ?>></li>
<?php endfor; ?>
</ol>
<div class="carousel-inner">
<?php for ($i = 0; $i < count($images); $i++): ?>
<div class="carousel-item <?php if ($i==0) echo 'active'; ?>">
<img src="image.php?id=<?= $images[$i]['image_id']; ?>" class="d-block w-100">
</div>
<?php endfor; ?>
</div>
<a class="carousel-control-prev" href="#lightbox" role="button" data-slide="prev">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.