Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/02/2011, 10:54
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: Imagenes Aleatorias (Se Repiten)

Yo haria lo siguiente:

Tener un array con la siguiente estructura:

[0] => array [ [img]=>'ruta', [url]=>'url', [txt]=>'text' ]
[1] => array [ [img]=>'ruta', [url]=>'url', [txt]=>'text' ]

etc ...
Entonces tu array seria:
Código PHP:
Ver original
  1. $imagenes = array(
  2.     array(
  3.         'img' => 'http://nahjupr.files.wordpress.com/2009/01/wordpress-logo.png?w=300',
  4.         'url' => 'http://www.1.com',
  5.         'txt' => 'Visita el enlace del banner 1'
  6.     ),
  7.  
  8.     array(
  9.         'img' => 'http://img.dinero20.com/wp-content/uploads/2010/02/joomla.png',
  10.         'url' => 'http://www.2.com',
  11.         'txt' => 'Visita el enlace del banner 2')
  12. );

Hacer un shuffle() y luego ir imprimiendo las imagenes.