Usuario:ManuelRomero/NewPHP/Arrays/Ejercicios/Ejercicio4
De WikiEducator
- Posible solución
<!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <meta charset="UTF-8"/> <meta http-equiv="refresh" content="5" url="index.php"/> <title></title> </head> <body> <?php $imagenes = array( "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/a_piece_for_the_wicked_vol_1.jpg", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/double_t.jpg", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/flagrantly_yours.jpg", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/gothic.jpg", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/iliad_of_a_wolverhampton_wanderer.jpg", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/libertine.jpg", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/lullabies_for_tough_guys.jpg", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/nocturnal_nomad.jpg", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/the_idle_gait_of_the_self_possessed.gif", "http://www.tecn.upf.es/~ocelma/cpom/practicas/php/random_images/discography/the_life_and_times_of_a_ballad_monger.jpg" ); $n1=rand(0,9); $n2=rand(0,9); $n3=rand(0,9); echo "<img src=$imagenes[$n1]><img src=$imagenes[$n2]><img src=$imagenes[$n3]>"; ?> </body> </html>