Doing some reading up on Arrays.
There seems to be a problem with this
while ($rowans = mysql_fetch_array($resultans)) {
$registerdates = array($rowans['registerdate'], $rowans['sampledate'];
}
Note I removed the [] from$registerdates = .
first if doing the following, it only seems to do the action once, i.e. registerdates[0] has a value but nothing else does (e.g.registerdates[1]) (note I am trying with only the one value here (i.e. registerdate).)
while ($rowans = mysql_fetch_array($resultans)) {
$registerdates[] = array($rowans['registerdate']);
as opposed to
registerdates[] = $rowans['registerdate'];
So I do:
registerdates[] = $rowans['registerdate'];
registerdates[] =$rowans['sampledate'];
however this produces first all the registerdates And then only the sample dates - but the 2 are related i.e. sampledate[1] links to registerdate[1]. I need to be able to pull both out at a time. like in your
echo $value['registerdate'] . ' / ' . $value['sampledate'] . '<br />';
but I don't think its the correct type of array to do that???