neilgee
6/30/2016 - 6:22 AM

Output a random string in PHP

Output a random string in PHP

<?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>';  ?>