ceu-notes/2/IAW/assignments/t3-ej4-ejercicios-php-naortega/ej1-1.php

16 lines
273 B
PHP
Raw Normal View History

2022-11-10 19:41:24 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Imagen Aleatoria</title>
</head>
<body>
<?php
$imgs[0] = "imgs/img0.jpg";
$imgs[1] = "imgs/img1.jpg";
$imgs[2] = "imgs/img2.jpg";
?>
2022-11-10 19:45:21 +00:00
<img src="<?= $imgs[rand(0, count($imgs)-1)] ?>" />
2022-11-10 19:41:24 +00:00
</body>
</html>