i need help about how to parsing this array in codeigniter
array ( [0] => test0 [1] => test1)
in the CodeIgniter user guide i found this:
{blog_entries}
<h5>{title}</h5>
<p>{body}</p>
{/blog_entries}
Thats works if the array is like:
$data = array(
'blog_title' => 'My Blog Title',
'blog_heading' => 'My Blog Heading',
'blog_entries' => array(
array('title' => 'Title 1', 'body' => 'Body 1'),
array('title' => 'Title 2', 'body' => 'Body 2'),
array('title' => 'Title 3', 'body' => 'Body 3'),
array('title' => 'Title 4', 'body' => 'Body 4'),
array('title' => 'Title 5', 'body' => 'Body 5')
));
http://www.codeigniter.com/user_guide/libraries/parser.html?highlight=parsing
But I receive array like this from one API:
$data = array(
'blog_title' => 'My Blog Title',
'blog_heading' => 'My Blog Heading',
'blog_entries' => array(
array('0' => 'Title 1', 'body' => 'Body 1'),
array('1' => 'Title 2', 'body' => 'Body 2'),
array('2' => 'Title 3', 'body' => 'Body 3'),
array('3' => 'Title 4', 'body' => 'Body 4'),
array('4' => 'Title 5', 'body' => 'Body 5')
));
How i can parse it? or how i can transform numbers [0,1,2,3] to [title,title,title,title]