http://www.php.net/array_rand
$input = Array(1,2,3,4,5,6,7,8);
$rand_keys = array_rand($input);
echo $input[$rand_keys[0]];
You can add an argument after $input, such as 4, this will give you a 4 item array each with a random value from $input.
echo $input[$rand_keys[0]];
echo $input[$rand_keys[1]];
echo $input[$rand_keys[2]];
echo $input[$rand_keys[3]];
HTH
Andrew