This is a function I've found very useful in a number of Wordpress themes I've been developing, whereby I want to randomly select and display one of a set number of jpgs (called 1.jpg, 2.jpg, 3.jpg et cetera) The magic function is rand() which returns a random integer. There are two uses int rand (void) [...]