It\'s the second day I try to find a solution for this problem.
I have an array.
$datas;
$datas[0]; // 8000
$datas[1]; // 8001
$datas[2]; // 8003
$datas
Sort from lowest to highest (if not already sorted) and then increment from the lowest and check if it is in the array:
sort($datas);
for($i=reset($datas); in_array($i, $datas); $i++);
echo $i;
reset
gets the first number, in this case 8000 to start and the in_array
condition terminates the loop when $i
is not in the array.