title: Multiple IF Condition in Code Igniter
body: <p>I want to show some data into table with two paramaters from combobox </p>
  
  <p>When I choose combobox 'kategori' and combobox 'option', I want data can be show in table, but when I try this code :</p>
  
  <pre><code> foreach ($filter as $f) {
  
              if ( ($f['name'] == 'kategori' &amp;&amp; $f['value'] == 'cake') &amp;&amp; ($f['name'] == 'option' &amp;&amp; $f['value'] == 'sweet') ) {
  
  
                  $totalRecord = $this-&gt;nas-&gt;countRecord($filter);
                  $this-&gt;load-&gt;library('pagination');
                  $config['base_url'] = base_url('transaksi/report_nas/show/');
                  $config['total_rows'] = $totalRecord;
                  $config['per_page'] = 10;
                  $config['uri_segment'] = 4;
                  $this-&gt;config-&gt;load('pagination');
                  $this-&gt;pagination-&gt;initialize($config);
                  $data['pagination'] = $this-&gt;pagination-&gt;create_links();
                  $data['total'] = $config['total_rows'];
                  $start = (($page - 1) * $config['per_page']);
                  $data['no'] = $start + 1;
                  $data['records'] = $this-&gt;nas-&gt;recordsList($start, $config['per_page'], $filter);
                  $data['filter'] = $filter;
                  $data['shop'] = $shop;
                  (count($data['records']) &gt; 0 ) ? $this-&gt;load-&gt;view('transaksi/report_nas/table', $data) : $this-&gt;load-&gt;view('noevent');
  
                 }
  
              } 
  </code></pre>
  
  <p>this syntax doesn't work :</p>
  
  <pre><code>if ( ($f['name'] == 'kategori' &amp;&amp; $f['value'] == 'cake') &amp;&amp; ($f['name'] == 'option' &amp;&amp; $f['value'] == 'sweet') ) {
  </code></pre>
  
  <p>I have try this one too :</p>
  
  <pre><code>if ($f['name'] == 'kategori' &amp;&amp; $f['value'] == 'cake') {
     if ($f['name'] == 'option' &amp;&amp; $f['value'] == 'sweet')  {
  </code></pre>
  
  <p>both of them show no data. </p>