Thank’s, but i have the problem again :
I was used the array manipulation in my application, like this :
$entries = array(
array('title' => 'Hey', 'body' => 'My Name is Ikhsan'),
array('title' => 'Hi!', 'body' => 'How are you today ?'),
array('title' => 'Hello!', 'body' => 'I'm very Handsome :d ?'),
);
// i have a simple comment(detail for every posted posting)
foreach ($entries as $key => $entry)
{
$no = $key+1;
$entries[$key]['no'] = $no;
$entries[$key]['comment'] = array(
array('name'=>'samson'.$no,'comment'=>'comment'.$no),
array('name'=>'ryan'.$no,'comment'=>'komentar'.$no)
);
//detail comment
foreach($entries[$key]['comment'] as $keys => $val){
$entries[$key]['comment'][$keys]['numcomment'] = $keys + 1;
}
}
And the View, like this :
{blog_entries}
Number post : {no}
{title}
{body}
<b>The Comments : </b>
{comment}
{numcomment}. {name} {comment}
{/comment}
{/blog_entries}
And my question is, with no PHP code in view :
Can i create if statement in template(or if is only in controller? => ) ? (with template parser method)
for example : if {numcomment%2!=0 then <font color=red>{comment}</font>}