1
I’m trying to do the scheme of creating a loop from 1 to 70 for example
at the bank will return
1 10 11 20 39 50 67 69
from 1 to 70 only it will all, will only bring some numbers between 1 and 70 .
I am trying to create a loop using the for from 1 to 70 and compare with the values shown above that returns from the database, I need to show on the screen the values from 1 to 70 that do not have in the database, I mean that it would be possible to do this?
Follows 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";
}
I would recommend that you already search [Dit] your question and improve the text, mainly using scores. It’s practically illegible and incomprehensible.
– Woss
my doubt is simple I wonder if I can bring different information comparing two arrays
– teste1234