In phpMyAdmin, I am writing
SELECT `class` FROM `teachers` WHERE `var1`=3;
I can give results. The Results are 5,6,7,8,9,10. I am Trying this code in Sublimetext3. code is like this :
<tr>
<?php
$classlistdata = $db->getrows("SELECT `class` FROM `teachers` WHERE `var1`=3; ");
foreach ($classlistdata as $ndcld) {
?>
<td height="25" colspan="3" ><span class="admin"><?php echo ($ndcld); ?></span></td>
<?php } ?>
</tr>
this code writing 6 times "array" . How can I fix it. I am new PHP. thanks for your answer.