Quantcast
Channel: Últimos conteúdos
Viewing all articles
Browse latest Browse all 14190

Arrumar condição e while

$
0
0

Galera como eu poderia "arrumar" essa condição:

<?php 

while($row = mysql_fetch_assoc( $rs )) { 

?>

<?php  if ($row['produto'] != "") { ?>
<tr>                              
<th><?php echo $row["os"] ?></th>
<th><?php echo $row["nomeempresa"] ?></th>
<th><?php echo $row["produto"] ?> 
</tr>
<?php } ?>

<?php  if ($row['produto2'] != "") { ?>
<tr>                              
<th><?php echo $row["os"] ?></th>
<th><?php echo $row["nomeempresa"] ?></th>
<th><?php echo $row["produto1"] ?> 
</tr>
<?php } ?>

<?php  if ($row['produto2'] != "") { ?>
<tr>                              
<th><?php echo $row["os"] ?></th>
<th><?php echo $row["nomeempresa"] ?></th>
<th><?php echo $row["produto2"] ?> 
</tr>
<?php } ?>
<?php } ?>

Viewing all articles
Browse latest Browse all 14190