Improve the code to be more efficient.

This commit is contained in:
Nicolás A. Ortega Froysa 2022-11-10 20:36:24 +01:00
parent f4accf8ed9
commit 4ee2ec9ea1

View File

@ -8,8 +8,7 @@
<?php
$imgs[0] = "imgs/img0.jpg";
$imgs[1] = "imgs/img1.jpg";
$select = rand(0, 1);
?>
<img src="<?= $imgs[$select] ?>" />
<img src="<?= $imgs[rand(0, 1)] ?>" />
</body>
</html>