Based on your questions, I figured out my problem. For clarity in what I am doing here is some additional information:
Database structure (4 fields)
| nm_surname | nm_email | valid_em | valid_mem |
.
.
.
n
Etc. There are 3400 surnames stored in this database.
When I build the page, I populate an array with nm_surname and nm_email and have it return a table with a max of 6 columns in vertical order. I added the array $valid_em$, and then made the call
if (strcmp("No", $valid_em[$i + ($j * $rows)])==0) {
echo "<img width=13 height=12 align=absmiddle src=\"exclamation.jpg\" border=0></td>";
If the result returned is a "No", then it adds a small jpg image (exclamation point) to the end of the surname. This way, as people browse the database, they will know that the current email contact for that name is not valid.
I think I will look into using just 1's or 0's for this instead of Yes and No. Since there are volunteers who will assist with future updates, trying to make it as easy as possible for them.
Thanks for the questions..made me see where my problems were.
Richard
The changed code is:
while($row = mysql_fetch_array($result)) {
$data[] = $row['nm_email'];
$data2[] = $row['nm_surname'];
$valid_em[] = $row['valid_em'];
}
echo "<TABLE BORDER=1 cellpadding=5 align=center>\n";
for ($i = 0; $i < $rows; $i++) {
echo "<tr>";
for ($j = 0; $j <$columns; $j++) {
if(isset($data[$i + ($j * $rows)])) {
echo "<td><li> <A HREF=\"mailto:".$data[$i + ($j * $rows)]."\">".$data2[$i + ($j * $rows)]."</li>";
}
if (strcmp("No", $valid_em[$i + ($j * $rows)])==0) {
echo "<img width=13 height=12 align=absmiddle src=\"exclamation.jpg\" border=0></td>";
}
}
echo "</tr>";
}
echo "</table>";