I am creating a quoting system for our company and I have come into a small problem. Here's the rundown; I have two tables, one named data, the other named zips. The client enters their gender, age, if they use tobacco, zipcode, and state.
Here's the data table:

Here's the zips table:

I've queried the two tables to join based on zip lookup code. Here's the query I'm using:
SELECT data.Monthly_Rate, zips.ZIP_LOOKUP_CODE AS Expr1, zips.State, zips.County, zips.City, zips.Zipcode
FROM data INNER JOIN
zips ON data.ZIP_LOOKUP_CODE = zips.ZIP_LOOKUP_CODE
WHERE (zips.Zipcode = '$zipcode') AND
(data.Company_Old LIKE '%Blue Cross%') AND
(data.Plan IN ('A','F','F (High)','G','N')) AND
(data.Gender = '$gender') AND
(data.Age = '$age') AND
(data.Tobacco = '$tobacco') AND
(data.State = '$state');
Now what I want to do is output this in php in a table. The problem I'm coming across is there are multiple Plan letters under the "Plan" column. I only want to return 5 different ones, but the issue is some companies don't offer all 5 of those plans, so in this instance when I'm outputting the array, the rate for a certain plan will line up in the wrong column in the table.
Basically, I don't know how to align the data correctly in the specific column it should be in. In a scenario where a plan A, F, and N are only available for the company, it will fill the first three fields, and the rate for plan N will not line up in the plan N column.
I need to figure out how to associate a given rate with the Plan letter, and output it correctly in the table. In the instance below Plan A rate is $111.40, Plan F is 135.37 and Plan N rate is $96.52. As you see, the Plan N rate is not aligning correctly. How do I go about fixing this?
Table output:

This is what I'm using to output the array in PHP:
while($row = mysql_fetch_array($PlanRates))
{
$Plan = "$" . number_format($row['Monthly_Rate'], 2, '.', '');
echo "<td align='center'>$Plan</td>";
}
echo "</tr>";
mysql_free_result($PlanRates);