Created
April 14, 2013 16:40
-
-
Save schutzsmith/5383348 to your computer and use it in GitHub Desktop.
Random text in PHP
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
<? | |
$random_text = array("Random Text 1", | |
"Random Text 2", | |
"Random Text 3", | |
"Random Text 4", | |
"Random Text 5"); | |
srand(time()); | |
$sizeof = count($random_text); | |
$random = (rand()%$sizeof); | |
print("$random_text[$random]"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment