jeudi 24 mai 2018

Trying to get multiple randomised result returned from mysql database

Hi I have spent most of the day on this and turn to you in the hope someone can help. I need to generate a random display 5-10 embedded youtube vids on a page without duplication. I can get the videos to display (but all of the same artist) when I refresh it displays a new set of videos but again all of the same artist. I know the answer is probably very simple but I just can't see it.

Any help or pointers would be most appreciated.

The initial code is:

With the output being:

<div class="ws_images"><ul>
            <iframe width="300" height="300" src="https://www.youtube.com/embed/<?       php echo $Youtube ?>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
            <iframe width="300" height="300" src="https://www.youtube.com/embed/<?php echo $Youtube ?>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
                    <iframe width="300" height="300" src="https://www.youtube.com/embed/<?php echo $Youtube ?>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
                            <iframe width="300" height="300" src="https://www.youtube.com/embed/<?php echo $Youtube ?>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
                                    <iframe width="300" height="300" src="https://www.youtube.com/embed/<?php echo $Youtube ?>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
    </ul></div>




Aucun commentaire:

Enregistrer un commentaire