title: Bootstrap Carousel - get images from database via php first image to be random then in order
body: <p>I am using a bootstrap carousel to show images in a slideshow, I retrieve the images via PHP from my database, here is my code:</p>
  
  <pre><code>    &lt;div class="myCarousel" class="carousel slide" data-ride="carousel"&gt;
          &lt;div class="carousel-inner" role="listbox"&gt;
             &lt;?php
  
                $myConnection= mysqli_connect("$server","$username","$password") or die ("could not connect to mysql");
                mysqli_select_db($myConnection, $database) or die ("no database");  
  
                $queryy = "SELECT * FROM images WHERE type = 'topofpage' ";
                $sqll = mysqli_query($myConnection,$queryy);
                while ($img=mysqli_fetch_array($sqll)) {
                ?&gt;
                  &lt;div class="item"&gt;
                     &lt;img src="test/assets/img/top/&lt;?php echo $img['filename']; ?&gt;" class="center"&gt;
                  &lt;/div&gt;
               &lt;?php
                }
  
               ?&gt;
           &lt;/div&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>This works perfectly fine, and I don't have any issues, however I would like the first image to be selected as random and images to follow in order.</p>
  
  <p>Any help is appreciated.</p>