title: Codeigniter, using if statement .. how to make it more simple?
body: <p>Codeigniter, using if statement .. how to make it more simple?</p>
  
  <pre><code>if($this-&gt;session-&gt;userdata('logged_in')!="" &amp;&amp; $this-&gt;session-&gt;userdata('stts')=="x")
  {
    Do action
  }
  else if ($this-&gt;session-&gt;userdata('logged_in')!="" &amp;&amp; $this-&gt;session-&gt;userdata('stts')=="y")
  {
    Do action
  }
  else if ($this-&gt;session-&gt;userdata('logged_in')!="" &amp;&amp; $this-&gt;session-&gt;userdata('stts')=="z")
  {
    Do action
  }
  else
  {
   done 
  }
  </code></pre>