I have this code here:
<?php foreach($blog_posts['post_category'] as $category) { ?>
How can I get this to work?
Basically I have a database with all my blog posts within them, one of the columns is post_category
I'm trying to make a list out of all these by a foreach statement that gets the results like so:
$data['blog_categories'] = $this->db->query("SELECT `post_category` FROM `blog_posts`");
This is codeigniter by the way... Then in my view I have the code:
<?php foreach($blog_posts['post_category'] as $category) { ?>
I need to display each category in an li...