while($row = mysql_fetch_array($query )){
echo "<td>.$row['pid'].</td>";
echo "<td>.$row['owgh'].</td>";
echo "<td>.$row['nwgh'].</td>";
if (isset($before) and $before!=$row['pid']) {
echo "<td>-----</td>";
}
$before= $row['pid'];
}
while($row = mysql_fetch_array($query )){
echo "<td>.$row['pid'].</td>";
echo "<td>.$row['owgh'].</td>";
echo "<td>.$row['nwgh'].</td>";
if (isset($before) and $before!=$row['pid']) {
echo "<td>-----</td>";
}
$before= $row['pid'];
}