
=$iStart;$i--) {
$tempTime=$currDate5-$i*300;
$dt = new DateTime("@$tempTime");
$urlImg="https://www.weather.gov.sg/files/rainarea/50km/v2/dpsri_70km_".$dt->format('YmdHi0000')."dBR.dpsri.png";
$classIdx=$i-$iStart;
if($classIdx > 9) $classIdx=9;
echo "

".PHP_EOL;
}
} else if(240 == $size) {
//240km
?>

=$iStart;$i--) {
$tempTime=$currDate15-$i*900;
$dt = new DateTime("@$tempTime");
$urlImg="https://www.weather.gov.sg/files/rainarea/240km/dpsri_240km_".$dt->format('YmdHi0000')."dBR.dpsri.png";
$classIdx=$i-$iStart;
if($classIdx > 9) $classIdx=9;
echo "

".PHP_EOL;
}
} else {
//480km
?>

=$iStart;$i--) {
$tempTime=$currDate30-$i*1800;
$dt = new DateTime("@$tempTime");
$urlImg="https://www.weather.gov.sg/files/rainarea/480km/dpsri_480km_".$dt->format('YmdHi0000')."dBR.dpsri.png";
$classIdx=$i-$iStart;
if($classIdx > 9) $classIdx=9;
echo "

".PHP_EOL;
}
}
?>