I have a sample PHP code
<?php
for ($x=0; $x<=3; $x++) {
echo '<tr><td>Column $x</td>';
$result = mysql_query(" SELECT id, `Nickname`,`hours` FROM `employee` ");
echo '<table border=1>';
while ($row = mysql_fetch_array($result)) {
echo '<tr>';
echo "<td>Nickname:".$row{'Nickname'}."</td><td>Hours: ".$row{'hours'}."</td>";
echo '</tr>';
}
echo '</table>';
echo '</tr>';
}
?>
and the result is something like this.
Column 1 Column 2 Column 3
Nickname: John Hours: 1 | Nickname: John Hours: 1 | Nickname: John Hours: 1
Nickname: Foo Hours: 2 | Nickname: Foo Hours: 2 | Nickname: Foo Hours: 2
I need to eliminate specific repeating rows. I dont need to repeat the Nickname Row.
the output should be like this Column 1 Column 2 Column 3 Nickname: John Hours: 1 | Hours: 1 | Hours: 1 Nickname: Foo Hours: 2 | Hours: 2 | Hours: 2