ceu-notes/2/IAW/assignments/ejercicios-php/ej2.php

15 lines
232 B
PHP

<!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";
?>
<img src="<?= $imgs[rand(0, 1)] ?>" />
</body>
</html>