I'm using PHP to display a table. I'm comparing on field 20 to eliminate duplicates. This is working...except I must not have everything in the right place.
My table comes up with only one listing per field 20 match, but it throws in empty TRs for all the other matches.
In other words, if I have 5 records with the matching criteria, it puts the information from one record in a row, then throws in 4 more empty rows.
How do I tell it tocreate a row only when field 20 is unique?
Here's what I've got:
$alreadyfounds = array(); # Clear what we've already found...
for ($mycount = 0; $mycount < $entiredbcount; $mycount++) {
if ($entiredb[$mycount][20] != "") {
$checkagainst = $entiredb[$mycount][20];
?>
<TR>
<TD>
<?php
if (($alreadyfounds[$checkagainst] != 1) && ($checkagainst != ""))
{
echo $entiredb[$mycount][6];
if (trim($entiredb[$mycount][6]) != "") {
echo " ";
}
echo $entiredb[$mycount][7];
?>
</TD>
etc. etc. for following TDs.
Obviously not right, but I'm totally puzzled.
Please tell me there's an easy solution to this?
Thanks