$imagenes=array("img1.jpg","img2.jpg", ... srand (time()); //para PHP 4.2.0 ya no es necesario llamar a srand shuffle ($imagenes); //ya están aleatoriamente los elementos