This is my code:
while($row = mysql_fetch_array($result))
{
echo '<tr>';
if($row['type'] == "product"){
echo '<td>'.$row['item'].'<br>('.$row['price'].')</td>';
}else{
echo '<td>'.$row['item'].'</td>';
}
echo '<td>'.$row['type'].'</td>';
echo '</tr>';
}
What I want is when item
type = product
then the price will show under the item.
Example:
Item | type
item1 product
($10.00)
item2 service
item3 product
($20.00)