i am having database table in Microsoft access which has field as follows: partno,description,quantity
when i am retriving data and trying to show it in html table it shows error
Illegal string offset 'partno'
my php code is as follows:
<?php
foreach($items as $row){
$partno=$row['partno'];
$desc=$row['description'];
$qty=$row['quantity'];
?>
<tr>
<td><?=$partno?></td>
<td><?=$desc?></td>
<td><?=$qty?></td>
</tr>
<?php
}
}
if(!($items)){
?>
<h3 style="color: red;">Item not found!</h3>
<?php
}
?>
i tried see data through
print_r($items);
data of array $items is :
Array (
[partno] => BRZU
[0] => BRZU
[description] => CONTROL UNIT
[1] => CONTROL UNIT
[quantity] => 3
[2] => 3
)