I'm trying to generate a list of articles from the this array
Array ( [0] => Array ( [id] => 1 [title] => Article1 ) [1] => Array ( [id] => 2 [title] => article2 ) )
Also add id value for each article, this is what I have tried, but its not working right.
<ul>
<?php
foreach ($result as $key => $value) {
foreach ($value as $item) { ?>
<li id=<?php echo "$id"; ?>> <?php echo "$item"; ?></li>
<?php
}
}
?>
</ul>
Your helps is highly appreciated.