I was wondering if someone would advise me why the following piece of code in an array won't seem to produce an output
I am getting no output at all.
If I adjust the above as follows
I can see the variables in $fld[0],$fld[1],$fld[2].
I would be grateful for any help received
Code:
$num_columns = $rs->Fields->Count();
for ($i=0; $i < $num_columns; $i++) {
$fld[$i] = $rs->Fields($i);
}
while (!$rs->EOF) //carry on looping through while there are records
{
$entered[$fld[0]->value][$fld[1]->value]=$fld[2]->value;
$rs->MoveNext(); //move on to the next record
}
echo $entered[1][1];
I am getting no output at all.
If I adjust the above as follows
Code:
while (!$rs->EOF) //carry on looping through while there are records
{
echo $fld[0]->value;
echo $fld[1]->value;
echo $fld[2]->value;
$entered[$fld[0]->value][$fld[1]->value]=$fld[2]->value;
$rs->MoveNext(); //move on to the next record
}
I can see the variables in $fld[0],$fld[1],$fld[2].
I would be grateful for any help received