I currrently dump an orders .txt file of data to a table and want to output them to view in a browser I have that part. My problem is that the if an order has multiple line items is puts it on a different row in the table ex order_id 123456, sku 1234, buyer John Doe order_id 123456, sku 5678, buyer John Doe So when I output the data it displays it as two records: John Doe Order #123456 sku 1234 John Doe Order#123456 sku 5678 where I only want it to be one with the two parts listed John Doe Order#123456 sku 1234 sku 5678 I am thinking I need a loop within a loop or something to that effect. Any idea's?? Here's a snippet of the code so far [code]$i=0; while ($i < $num) { $name=mysql_result($result,$i,"recipient_name"); $address1=mysql_result($result,$i,"ship_address_1"); $address2=mysql_result($result,$i,"ship_address_2"); $city=mysql_result($result,$i,"ship_city"); $state=mysql_result($result,$i,"ship_state"); $zip=mysql_result($result,$i,"ship_postal_code"); $order=mysql_result($result,$i,"order_id"); $email=mysql_result($result,$i,"buyer_email"); $qty=mysql_result($result,$i,"quantity_purchased"); $sku=mysql_result($result,$i,"sku"); $product=mysql_result($result,$i,"product_name"); ?> <table > <tr> <td><font face="Arial, Helvetica, sans-serif"><? echo "$name"; ?></font></td> </tr><tr> <td><font face="Arial, Helvetica, sans-serif"><? echo "$address1"; ?></font></td> </tr><tr> <td><font face="Arial, Helvetica, sans-serif"><? echo "$address2"; ?></font></td> </tr><tr> <td><font face="Arial, Helvetica, sans-serif"><? echo "$city, $state $zip"; ?></font></td> </tr><tr> <td><font face="Arial, Helvetica, sans-serif"><? echo "$order"; ?></font></td> </tr><tr> <td><font face="Arial, Helvetica, sans-serif"><? echo "$email"; ?></font></td> </tr><tr> <td><font face="Arial, Helvetica, sans-serif"><? echo "$qty $sku $product"; ?></font></td> </tr> [/code]