I currently have a piece of code that is selecting random values from an array but I would like to prevent it from selecting duplicate values. How can I achieve this? This is my code so far:
$facilities = array("Blu-ray DVD Player","Chalk board","Computer", "Projector",
"Dual data projector", "DVD/Video");
for($j = 0; $j < rand(1, 3); $j++)
{
$fac = print $facilities[array_rand($facilities, 1)] . '<br>';
}