Skip to content

Instantly share code, notes, and snippets.

Created Apr 21, 2021
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; ?>
<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">
<?php endfor; ?>
<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