Ok so I’m not even sure how to title this post but I have a little logical problem that I need help with. So on a front page of a website I need 4 boxes. These four boxes contain 1 image, 1 title, one date. The trick is, these four boxes need to be randomly generated from a list of 10. So in javascript is it possible to create something like an xml structure to pick 4 random from then populate… so the way I want it to work is…
- Item 1
- date
- title
- src
- Item 2
- date
- title
- src
- Item 3
- date
- title
- src
Is it possible to put the items in an array then access the properties of them after they are randomly selected? I could do this with PHP/MySQL but that’s very unnecessary for this. any ideas? Thanks!
Short answer, yes. Long answer below.