I'm trying to make the schematic create a loop from 1 to 70 for example
In the database will return
1 10 11 20 39 50 67 69
From 1 to 70 only everything will go, it will only bring some numbers between 1 and 70.
I'm trying to create a loop using the from 1 to 70 and compare with the values shown above that returns from the bank, I need to display on the screen the values from 1 to 70 that does not have in the database, ie, which does not have Would it be possible for the bank to do this?
Follow the code:
$aleatorio = rand(1, 70);
echo $aleatorio."<br>";
$recorte = $valor."_".$aleatorio;
$query = mysqli_query($con,"select material_name_crop from qe.etiquetas_recortadas_aoi where material_name_crop = '$recorte' and line = '$pkg' and brand = '$brand'") or die("erro na query");
$rows = mysqli_num_rows($query);
if($rows < 1){
echo $recorte." - ".$pkg." - ".$brand." S";
}else{
$pesq = mysqli_query($con,"select material_name_crop from qe.etiquetas_recortadas_aoi where material_name_crop like '%$valor%' and line = '$pkg' and brand = '$brand'") or die("erro na query");
$total = mysqli_num_rows($pesq);
echo "Total ".$total."<br><hr>";
$count = 0;
while($recorte = mysqli_fetch_array($pesq)){
$count = $count+1;
$content = explode("_",$recorte[0]);
$t = $content[1];
//print_r($content);
for($i=0;$i<=70;$i++){
$j[] = $i;
//echo $j[$i];
$result = array_search($j[$i], $content[1]);
echo $result;
// echo array_diff($val)." - ";
}
echo "<br>".$count." - ".$content[1]." / ";
//print_r($j);
}
echo "<br>".$count." - ".$content[1]." / ";
//print_r($j);
}
//echo $recorte[0]." - ".$pkg." - ".$brand." N";
}