<?php
$dataset = array(1, 2, 3, 4, 5, 6, 7, 8, 9);
$taken = array(3, 6, 5, 2, 4);
$nottaken = array_diff($dataset, $taken);
$nottaken = array_values($nottaken);
print_r($nottaken);
?>
Does in fact output:
Array ( [0] => 1 [1] => 7 [2] => 8 [3] => 9 )
I don't really like that solution though lol, I don't know why. I don't imagine it to be much faster than the first solution because in the background it's doing the same thing, except this one has to run an extra function.. so if anything, it's slower.. but the speed differences would be so small that it doesn't really matter.. pick whichever.. though to be honest, I think the TS has given up on this thread because he/she didn't get a reply within 10 minutes lol.