hello i want to ask on display on my receipt. this is my receipt
|Food Name |Price|
Burger No : 1
|Bun |$1.00|
|Lamb |$2.00|
|Pickel |$1.20|
|Chilli |$0.60|
Burger No : 2
|Standard |$0.80|
|Chicken |$1.00|
|Normal |$1.00|
|Normal |$1.00|
Burger No : 3
|Crispy |$1.30|
|Beef |$1.20|
|Extra |$1.10|
|Hot |$1.10|
Burger No : 4
this is my coding
if($query_run = mysql_query($query1))
{
echo "
<tr>
<td>Food Name</td>
<td>Price</td>
</tr>";
$counter = 0;
while($row = mysql_fetch_array($query_run))
{
if($counter==0)
{
echo"<tr>
<td>Burger No:1</td>
</tr>";
}
echo "<tr>
<td>".$row['fname']."</td>
<td>$".$row['total']."</td>
</tr>";
$total_price += $row['total'];
//echo "burger $counter";
$counter++;
if($counter==4)
{
echo"<tr>
<td>Burger No:2</td>
</tr>";
}
if($counter==8)
{
echo"<tr>
<td>Burger No:3</td>
</tr>";
}
if($counter==12)
{
echo"<tr>
<td>Burger No:4</td>
</tr>";
}
}
my question is how can i remove the burger no example below:
if i buy 8 items then it should display burger no 1 and burger no 2 list...but the burger no 3 will also appear, same goes if i buy 12 items the burger no 4 will appear. How can i remove the burger no?
Please and thank you for your cooperation.