Add PHP exercise ej2

This commit is contained in:
Nicolás A. Ortega Froysa 2022-11-10 20:21:17 +01:00
parent cc318e0687
commit f4accf8ed9
3 changed files with 15 additions and 0 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB