How to make random text?

Hello, how to make the transition to the page we were met randomly privetstvie?
In different languages, so I went to the page and there is hello, then updated and there ciao
April 19th 20 at 12:29
3 answers
April 19th 20 at 12:31
collect an array of strings, and randomly out of it to pull out one item
April 19th 20 at 12:33
$input = array("Hello", "Nihao", "from Ukraine", "evening in the hut");

$rand_keys = array_rand($input, 1);
echo $input[$rand_keys];
April 19th 20 at 12:35
Is there any way to implement:

$a = array("Hello", "Hi", "Ciao");
echo $a[rand(0, count($a))];

Find more questions by tags PHP