Last active
February 13, 2024 07:54
-
-
Save taniarascia/09903dc7c30929b5826a to your computer and use it in GitHub Desktop.
Call random image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$random = rand(0, 2); | |
$picture = array( | |
'pic.jpg', | |
'other-pic.png', | |
'something.gif' | |
); | |
?> | |
<img src="<?php echo $picture[$random];?>"></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment