[Solved] How to echo random text in PHP? [closed]


$lines = array("one", "two", "three","four");
for($i =0; i < count($lines)-1;i++){

$line = $lines[rand(0, count($lines)-1)];
$lines = array_diff($lines, array($line));//Use this to remove the index of array
}

i wrote this in the stack overflow chat so there might be a problem or two. though, all looks well to me.

Was this what you were looking for?

solved How to echo random text in PHP? [closed]