I have a table of car owners, a table of car makers and a "look up" table to index the make of cars owed by a person when they own more than one (e.g. owner 1 has both a ford and a chevy). I return the results using:
while ( $row = mysql_fetch_array($result) ) {
echo("<TR><TD>" . $row["Owner"] . "</TD><TD>" . $row["Make"]. "</TD></TR>);
}
But this returns the owner's name twice:
| Bob | Ford |
| Bob | Chevy |
How do I eliminate the duplicate owner names, but output that the owner has more than one make of car (in the same table cell)?
| Bob | Ford Chevy |
while ( $row = mysql_fetch_array($result) ) {
echo("<TR><TD>" . $row["Owner"] . "</TD><TD>" . $row["Make"]. "</TD></TR>);
}
But this returns the owner's name twice:
| Bob | Ford |
| Bob | Chevy |
How do I eliminate the duplicate owner names, but output that the owner has more than one make of car (in the same table cell)?
| Bob | Ford Chevy |