I would like to reset counter in the following loop. Have no idea how to do it
$j = 1;
while($row = mysqli_fetch_array($check)) {
$value = $row['tmpi'];
$calculate = mysqli_query($link,"SELECT * FROM tmpi_db WHERE tmpi_id = '".value."'");
$action = mysqli_num_rows($calculate);
if($j == $action) {
//RESET $j, $j must be one again, nothing is working I have tried $j = 1;
//It's keep incrementing 1,2,3,4,5,6,7.....
}
}
$j++
Please help