You could ask another question to get a quick(er) response (?) :)
Try this
$dupDetect = "";
$dup2Detect = "";
while($row = mysql_fetch_row($query)) {
echo "<tr class='tab_bg_1'>";
$colindex = 1;
$col2index = 1;
foreach ($row as $str) {
if ($colindex==1) { // change this to the column index desired
if ($str == $dupDetect ) {
$str=''; // blank if it is the same as previous
}
else {
$dupDetect = $str; // store it to compare against next
$dup2Detect = ""; // reset dup2 at the same time
}
} else if ($colindex==2) {
if ($str == $dup2Detect ) {
$str=''; // blank if it is the same as previous
}
else {
$dup2Detect = $str; // store it to compare against next
}
}
echo "<td>".$str."</td>";
$colindex++;
}
echo "</tr>";
}