Here is the section of code I am working on.
if (!$link = mysql_connect('localhost', 'user', 'pass'))
exit("Unable to make a connection to the database");
if (!mysql_select_db("weather_db", $link))
exit("Unable to select the database");
$array = array ();
$sql = 'ALTER TABLE `All_Wx_2002` ADD INDEX ( `Date_Valid` ) ';
$result = mysql_query ('SELECT `FMFP_ID` , `Date_Valid` , `Time_Valid` , `Temp` , `RH` , `CDir` , `WSpd` , `WGst` , `Rn_1` FROM All_Wx_2002 WHERE `Date_Valid` > current_date - interval 2 day ORDER BY `Date_Valid` desc, `Time_Valid` desc');
while ($row = mysql_fetch_assoc ($result))
{
extract ($row);
$array[$FMFP_ID] = array ('Temp' => $Temp, 'RH' => $RH, 'Time_Valid' => $Time_Valid, 'Date_Valid' => $Date_Valid, 'CDir' => $CDir, 'WSpd' => $WSpd, 'WGst' => $WGst, 'Rn_1' => $Rn_1);
if ($array[$FMFP_ID][$Temp] == -99.9){$array[$FMFP_ID][$Temp] = "N/A";}
}
Now I only have one record that I made up in the 2 day interval for now, but the Temp is -99.9 I get the -99.9 displayed and there are no spaces in front or after. However, I can't figure out how to get N/A to replace the -99.9!! This seems so simple. Thanks.