your for part is no good.
you could simply do a check INSIDE your do while loop (which incidentally should probably be a while do loop)
and say
if ($row_Recordset1['SubId'] != $Test) continue;
OR you coud modify the mysql so that it only fetched rows with that setting.
-mouser
Mouser, you're the man.. Your if statement worked like a charm.. For anybody who uses this as a reference, this is what worked:
<?php do { ?>
<tr>
<?PHP if ($row_Recordset1['SubId'] != $Selection) continue; ?>
<td><?php echo $row_Recordset1['SubId']; ?></td>
<td><?php echo $row_Recordset1['CatId']; ?></td>
<td><?php echo $row_Recordset1['SubName']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>