this is really doing my nut in. I\'m passing a multidimensional array to a view like this:
$res = $this->deliciouslib->getRecentPosts();
In CodeIgniter, when you pass an array to the view every key is set a simple variable:
$data = array('foo' => 'bar');
$this->load->view('myview', $data)
// In your view
echo $foo; // Will output "bar"
So if you want to pass an array, just set a value as an array:
$data = array('foo' => array('bar1', 'bar2') );
$this->load->view('myview', $data)
// In your view
foreach($foo as $bar) {
echo $bar . " "; // Will output "bar1 bar2 "
}