how to rearrange randomly and show all the 5 elements
- by user295189
how can I rearrange it randomly and NOT use shuffle function and still be able to randomly arrange all the elements
$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
$rand_keys = array_rand($input, 5);
echo $input[$rand_keys[0]] . "\n";
echo $input[$rand_keys[1]] . "\n";
echo $input[$rand_keys[2]] . "\n";
echo $input[$rand_keys[3]] . "\n";
echo $input[$rand_keys[4]] . "\n";
so it shows random names everytime the function is ran. thanks