I figured it out!!!!
thanks for the help though....
I loaded an Array with the results...
$rows = mysql_num_rows($countyResult);
$result = array();
$counter = 0;
While ($row = mysql_fetch_array($countyResult)){
$result[$counter] = $row;
$counter++;
}
now $result is a multi dimensional Array containing my query results...I can loop through this array as many times as I want without it emptying.....
sooo I loop through to look at a particular field in order to set up my table header...
$counter = 0;
$countySeat2Exists = 0;
while (($counter < $rows) && ($countySeat2Exists == 0)){
$countySeat2 = $result[$counter]['county_seat2'];
if ($countySeat2 == "N/A"){
$countySeat2Exists = 0;
}else{
$countySeat2Exists = 1;
}
$counter++;
}
print"<table align='center' width='95%' border='1' cellpadding='5'><tr>";
print"<td>";
if ($stateName == "<b>All States</b>"){
print"<b>State</b></td><td>";
}
print"<b>County</b></td><td><b>FIPS Code</b></td><td><b>County Seat</b></td><td><b>ZipCode</b></td>";
if ($countySeat2Exists == 1){
print "<td><b>2nd Seat</b></td>";
}
print"</tr>";
then I loop through again to display the table....
$counter = 0;
while ($counter < $rows){
$countyFips = $result[$counter]['county_fips'];
$countyName = $result[$counter]['county_name'];
$stateFips = $result[$counter]['state_fips'];
$countySeat1 = $result[$counter]['county_seat1'];
$countySeatZip1 = $result[$counter]['county_seat_zip1'];
$countySeat2 = $result[$counter]['county_seat2'];
$countySeatZip2 = $result[$counter]['county_seat_zip2'];
$countyStart = $result[$counter]['county_start'];
$countyEnd = $result[$counter]['county_end'];
$countyLink = $result[$counter]['county_link'];
$countyPhone = $result[$counter]['county_phone'];
$resultStateName = stateQuery($stateFips , $conn);
print"<tr><td>";
if ($stateName == "<b>All States</b>"){
print"$resultStateName</td><td>";
}
print"$countyName</td><td>$countyFips</td><td>$countySeat1</td><td>$countySeatZip1</td>";
if ($countySeat2Exists == 1){
if ($countySeat2 == "N/A"){
print"<td> </td>";
} Else {
print"<td>$countySeat2</td>";
}}
print"</tr>";
$counter++;
} print"</table>";
You know a good array tutorial that explains how to move data from one array to another and how to get info out and such would be really nice. I found that the documentation is either real basic stuff you will move past quickly or incredibly complex expecting you to know very advanced concepts and syntax.
Thanks for the help... I am sure I will need more as the projects get bigger