Welcome Guest, Not a member yet? Register   Sign In
Parser and if statement
#3

This is my original code in contoller


PHP Code:
       $query $this->users_mod->allProducts();
 
        
        $data 
= array(
 
                 'ap_heading' => 'Product definition',
 
                 'ap_entries' => $query
                
);
 
       $content $this->parser->parse('allproducts'$dataTRUE); 
 
       $this->load->view('template'compact('content')); 


In view I go like this:
Code:
                   <tbody>
                       {ap_entries}
                           <tr>
                           <td>{id_pro}</td>
                           <td>{name}</td>
                           <td>{licensegen}</td>
                           <td>{version}</td>
                           <td>{expiration}</td>
                           <td>{options}</td>
                           <td>{username}</td>
                           <td>{active}</td>
                           </tr>
                        {/ap_entries}  
                   </tbody>

How to change my controller to get in view for active what I want to? I want to if {active} == 1 to write active, and if {active} == 0 to write disabled.

Can you help me?
Reply


Messages In This Thread
Parser and if statement - by sasatozovic - 04-15-2016, 08:22 AM
RE: Parser and if statement - by gxgpet - 04-15-2016, 08:32 AM
RE: Parser and if statement - by sasatozovic - 04-15-2016, 08:41 AM
RE: Parser and if statement - by gxgpet - 04-15-2016, 08:46 AM
RE: Parser and if statement - by sasatozovic - 04-15-2016, 08:53 AM
RE: Parser and if statement - by gxgpet - 04-15-2016, 09:04 AM
RE: Parser and if statement - by sasatozovic - 04-15-2016, 09:10 AM
RE: Parser and if statement - by PaulD - 04-15-2016, 09:52 AM
RE: Parser and if statement - by sasatozovic - 04-15-2016, 10:16 AM
RE: Parser and if statement - by albertleao - 04-15-2016, 11:36 AM
RE: Parser and if statement - by dmyers - 04-15-2016, 11:03 AM
RE: Parser and if statement - by ivantcholakov - 04-15-2016, 11:35 AM
RE: Parser and if statement - by InsiteFX - 04-15-2016, 06:41 PM
RE: Parser and if statement - by sasatozovic - 04-16-2016, 04:22 AM
RE: Parser and if statement - by kilishan - 04-15-2016, 07:25 PM
RE: Parser and if statement - by sasatozovic - 04-16-2016, 04:07 AM
RE: Parser and if statement - by Tpojka - 04-16-2016, 06:45 AM
RE: Parser and if statement - by sasatozovic - 04-16-2016, 07:08 AM
RE: Parser and if statement - by InsiteFX - 04-16-2016, 10:53 AM
RE: Parser and if statement - by sasatozovic - 04-16-2016, 01:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB