mardi 25 août 2015

How to filter any given number of html tags through php

I'm working on a project in which I want to display randomly any given number of results suppose, I have six <html> tags of image and I only want to display three randomly so that every time we refresh the page it show randomly any three image out of any six.

I'm using HTML code for an example

 <html>
 <body>
 <img src="image1.jpg">
 <img src="image2.jpg">
 <img src="image3.jpg">
 <img src="image4.jpg">
 <img src="image5.jpg">
 <img src="image6.jpg">
 </body>
 </html>

Out of these six images I only want to show any three images each time through PHP. Is it possible and how can I do that? Hope you may find any better solution.




Aucun commentaire:

Enregistrer un commentaire