Ok.. try changing // now pass through to see if any duplicate high, low, high precip exists and format the strings
foreach ($usaStations as $n => $vals) {
list($tHigh,$tLow,$tPrecip,$tPrecipEstim,$tData,$tState,$tStation) = explode("\t",$vals);
if($tHigh < -90 or $tLow < -90 ) { continue; }
if($tHigh == $usahighValue) {
$usahigh .= "<b>$tHigh$tUOM at $tStation, $tState</b>\n";
}
if($tLow == $usalowValue) {
$usalow .= "<b>$tLow$tUOM at $tStation, $tState</b>\n";
}
if($tPrecip == $usaprecipValue and $tPrecip > 0) {
$tPrecipFmt = sprintf("%01.2f",$tPrecip/100);
$usaprecip .= "<b>$tPrecipFmt$rUOM at $tStation, $tState</b>\n";
}
}
to // now pass through to see if any duplicate high, low, high precip exists and format the strings
$gotLow = false;
$gotHigh = false;
$gotPrecip = false;
foreach ($usaStations as $n => $vals) {
list($tHigh,$tLow,$tPrecip,$tPrecipEstim,$tData,$tState,$tStation) = explode("\t",$vals);
if($tHigh < -90 or $tLow < -90 ) { continue; }
if($tHigh == $usahighValue and ! $gotHigh) {
$usahigh .= "<b>$tHigh$tUOM at $tStation, $tState</b>\n";
$gotHigh = true;
}
if($tLow == $usalowValue and ! $gotLow) {
$usalow .= "<b>$tLow$tUOM at $tStation, $tState</b>\n";
$gotLow = true;
}
if($tPrecip == $usaprecipValue and $tPrecip > 0 and ! $gotPrecip ) {
$tPrecipFmt = sprintf("%01.2f",$tPrecip/100);
$usaprecip .= "<b>$tPrecipFmt$rUOM at $tStation, $tState</b>\n";
$gotPrecip = true;
}
}
and that should stop after the first one found for each of High, Low and Precip.