You will get an infinite loop, simply because you run the query anew every single time through the while loop. That means, for each $id, you continuously run the query and extract the first row from it. So, for any query that returns more than zero rows, the continual re-execution of that query will make the while loop endless.
It's functionally similar in effect to the following pseudo-code, which will also loop forever since you're modifying the control condition within the loop:
loop i from 1 to 10
set i to 1
endloop
You should instead try something like:
foreach($ids as $id) {
$result = mysqli_query($conn, "SELECT * FROM `Table` WHERE `id`=$id;");
while($row = mysqli_fetch_array($result)) {
echo "id;";
}
}
This will run the query once for each ID and the while loop will process the rows for that query.