I am working on fpdf, I want to created boxes and show each data from database in differnt boxes. Like if I have 2 boxes with different XY dimension so I want to show value 1 in first box and value 2 in second box, But issue is when I used my code it is showing both value 1 and 2 in both boxes. My code is
$w = array(82,95); //for XY dimension
for($i=0;$i<2;$i++)
{
$reusult1 = $GLOBALS['conn']->query($sql2);
$queryresult=mysqli_num_rows($reusult1);
$this->Rect($w[$i], 47.5, 13, 9);
$this->SetXY($w[$i] , 47.5);
$this->SetFont( "Arial", "", 9);
while($rows = mysqli_fetch_assoc($reusult1)){
$this->Cell(4,4,$rows['position'],1,0,'C');
}
}
in $rows['position']
have values 1
and 2
.