Created
March 28, 2020 13:19
-
-
Save phpfiddle/786f0159a8e17b1e1f34aea22946a7db to your computer and use it in GitHub Desktop.
[ Posted by Dscholten ] Randomly select something to watch
This file contains hidden or 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 | |
$service = array("Hulu", "Amazon Prime", "Netflix", "Disney+", "Showtime"); | |
$genre = array("Romance", "Reality", "Drama", "Comedy", "Action", "Science Fiction", "Documentary"); | |
$type = array("Movie", "TV"); | |
$number = array("1st", "2nd","3rd", "4th", "5th", "6th"); | |
$randService = array_rand($service); | |
$randGenre = array_rand($genre); | |
$randType = array_rand($type); | |
$randNumber = array_rand($number); | |
?> | |
<style> | |
.main { | |
margin: auto; | |
width: 80%; | |
font-size: 75px; | |
} | |
</style> | |
<div class="main"> | |
<center> | |
<?php echo $service[$randService]; ?> | |
<?php echo "<br>".$genre[$randGenre]; ?> | |
<?php echo "<br>".$type[$randType]; ?> | |
<?php echo "<br>".$number[$randNumber]; ?> | |
</center> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment