Created
June 30, 2016 06:22
-
-
Save neilgee/db5fb83b52750b32ebe4642d060b4f0f to your computer and use it in GitHub Desktop.
Output a random string 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
<?php | |
//add your strings to the array | |
$input = array( | |
"Where friendships flourish and grow", | |
"Where you are treated with respect", | |
"Where people are helpful and sincere", | |
"Where you feel safe and at home" | |
); | |
//output a random string | |
echo '<p><em class="statement">' . $input[array_rand($input)] . '</em></p>'; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment