Ok i try again 🙂
I want to make a label page
I have a table that contains a product_id and a nr (= total number of labels to print of this product)
i make the query, execute it and then output it with this code :
echo "<table border='1'>";
while($row = mysql_fetch_array($result)) {
for ($i = 1; $i <= $row[nr]; $i++) {
echo"<tr><td>";
echo "$row[product_id]<br>";
echo"</td></tr>";
}
}
echo "</table>";
the For structure in this code is to print out the product_id as many times as the number on the "nr" row
The output i get is :
230
230
230
230
234
235
280
...
the numbers are the product nrs
Now how do i code that the output will look like :
230 230 230
230 234 235
280
Hope i cleared the question now 🙂
Thx