Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/08/2006, 15:33
Avatar de Erikfrancisco
Erikfrancisco
 
Fecha de Ingreso: noviembre-2003
Ubicación: Estado de México
Mensajes: 503
Antigüedad: 20 años, 4 meses
Puntos: 4
PRUEBA ESTE EJEMPLO Y MODIFICALO A TUS NECESIDADES:

Código PHP:
<?php
$imagenes 
= array ( 'llanta.jpg''botellas_de_aceite.jpg''bujia.jpg',
                    
'puerta.jpg''volante.jpg''termostato.jpg',
                    
'limpia_parabrisas.jpg''retrovisores.jpg''freno.jpg' );
srand ( ( float ) microtime () * 1000000 );
shuffle $imagenes );
?>

<html>
<head>
   <title>Página de imagenes aleatorias</title>
</head>
<body>
   <center>
      <h1>Página de imagenes aleatorias</h1>
      <table width = 100%>
         <tr>
<?php
// aquí en el $i < 3 es donde indicaras cuantas imagenes mostrar
for ( $i 0$i 3$i++ ) 
{
   echo 
'<td align = "center"><img src ="';
   echo 
$imagenes $i ];
   echo 
'"width = "100" height = "100"></td>';
}
?>
         </tr>
   </center>
</body>
</html>
ESPERO TE HAYA SERVIDO DE ALGO O CUANDO MENOS TE HAYA DADO UNA IDEA.

Última edición por Erikfrancisco; 03/10/2006 a las 13:25