i have a doubt.this is my foreach loop
<table>
<?php foreach($this->msg as $l): ?>
<tr><td>
<a href="index.php/downloads?id=<?php echo $l->id;?>"><?php echo $l->name;?></a>
</td></tr>
<?php endforeach; ?>
</table>
where $this->msg is an array of results from db. this shows warning
Warning: Invalid argument supplied for foreach()
how should i resolve this?