Re: Space Weather
Posted: Sat 07 Nov 2015 7:57 pm
ok, I have modified my version to align (2nd/3rd table) data on %. If you have changed my original then I am not sure if the following will work. Two blocks of code changed...
Any problems will probably relate to changes in alignment code that have been made from my original which was written to suit my environment. Again, my level of knowledge may result in overkill
Code: Select all
.noaatab td{font-weight:bold;padding-left:40px;border:1px solid black;}
.noaatab td.pc{padding-left:30px;padding-right:30px;text-align:right;}
.noaatab td.first{padding-left:5px;color:red;}
Code: Select all
// split into array based on 2+ blanks in between
$strdata = preg_split('/ +/',$intable[$j]);
$strpc = ">";
if (strpos($strdata[1], '%') !== false) $strpc = 'class="pc">';
// format table data row
$strtable .= '<tr><td class="first">'.$strdata[0].'</td><td '.$strpc.$strdata[1].'</td><td '.$strpc.$strdata[2].'</td><td '.$strpc.$strdata[3].'</td></tr>';
}