Skip to content

Instantly share code, notes, and snippets.

@schutzsmith
Created April 14, 2013 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schutzsmith/5383348 to your computer and use it in GitHub Desktop.
Save schutzsmith/5383348 to your computer and use it in GitHub Desktop.
Random text in PHP
<?
$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