Skip to content

Instantly share code, notes, and snippets.

@tisuchi
Created October 21, 2018 14:51
Show Gist options
  • Save tisuchi/4e1fef5ea75ed66cf30d4af24b408d41 to your computer and use it in GitHub Desktop.
Save tisuchi/4e1fef5ea75ed66cf30d4af24b408d41 to your computer and use it in GitHub Desktop.
<?php
$db = mysqli_connect("localhost", "root", "", "ramcel");
$sql="SELECT * FROM photo ";
$result = mysqli_query($db,$sql);
?>
<div class="col-row">
<div class='col-lg-12'>
<?php
while ($row = mysqli_fetch_array($result)) {
?>
<!-- small two images in left column -->
<div class="col-lg-3">
<div class="row">
<div class="col-lg-12">
<img src='images/ <?php echo $row["image"]; ?>'>
</div>
<div class="col-lg-12">
<img src='images/ <?php echo $row["image"]; ?>'>
</div>
</div>
</div>
<!-- middle column big image -->
<div class="col-lg-6">
<div class="row">
<div class="col-lg-12">
<img src='images/ <?php echo $row["image"]; ?>'>
</div>
</div>
</div>
<!-- small two images in right column -->
<div class="col-lg-3">
<div class="row">
<div class="col-lg-12">
<img src='images/ <?php echo $row["image"]; ?>'>
</div>
<div class="col-lg-12">
<img src='images/ <?php echo $row["image"]; ?>'>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment