I have an array and a random number of elements is selected from this array. And we add the selected elements to the empty array. And I need to delete these selected items. I pulled out a random number of students, but I cannot delete the selected items.
<?php $used_arrays= array(); $input = array("Student 1", "Student 2", "Student 3", "Student 4", "Student 5", "Student 6", "Student 7", "Student 8", "Student 9", "Student 10"); $count=count($input); $count3=mt_rand(1,($count-3)); $rand_keys = array_rand($input, $count-3); for ($i=0; $i <$count3 ; $i++) { echo $random=$input[$rand_keys[$i]]."<br>"; $used_arrays[]=$random; } ?>