Welcome Guest, Not a member yet? Register   Sign In
parser loop problem
#1

Hello friends,

PHP Code:
$data = array(
 
       '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')
 
       )
); 


i write 

PHP Code:
{blog_entries}
     {
blog_heading}
     {
title}
{/
blog_entries

but blog_heading not writing how can i write in a loop ? blog_heading and title but main title ? 

be very hapy if you can help me 
thanks.
Reply
#2

SEE: Usage Notes
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

inadequate source . it does not work for me.
Reply
#4

Then I must guess that you are not using the $template.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

Hoping you figured it out... but, without ever having used this templating engine, you're attempting to output blog_heading while you're looping over blog_entries...

Code:
{blog_heading}
{blog_entries}
     {title}
{/blog_entries}

But, maybe not.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB