CodeIgniter Forums

Full Version: Get value from array without loop on parased template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i need to get value from array in a parased template, so in my case:
  • I made a template system where all templates end in .tpl
  • second, i need to get an value from a array like that 

 without usinge metod like 

Like Smarty template Engine do

This is my code:

$data = [
      'member'      => $member->memberInfo(),  // Array from DB if the member is logged otherwise it is false
      'content'   => $this->body

print $parser->setData( $data, 'raw' )->render( $layout );

I was not able to find it in the documentation or in the code and I need this in templates

I hope you get it cuz in this moment i can't exprime myself   Dodgy