I need to display table of contents from bottom to top. Since when a new row is inserted, it appears at bottom and when I access it using mysqli_fetch_array it shows the most recent inserted row at the bottom. The code is like this:
<?php
$abc = mysqli_connect("localhost","root","","members") or die(mysqli_error($abc));
$select_query = "SELECT title, url, photographer, genere, timestamp FROM gallery";
$select_query_result = mysqli_query($abc, $select_query) or die(mysqli_error($abc));
?>
And somewhere in html, this code appears.
<ol class="pictures">
<?php while($row = mysqli_fetch_array($select_query_result)) { ?>
<li class="thumbnail" data-div="<?php echo $row['genere'] ?>,<?php echo $row['photographer'] ?>,<?php echo $row['title'] ?>,<?php echo $row['timestamp'] ?>" style="background-image: url(<?php echo $row['url'] ?>)">
</li>
<?php } ?>
</ol>
So, what should I do to display it in reverse order so that I can get the most recent entry on top while displaying.