title: If else statement in codeigniter
body: <p>i want to create <code>if-else</code> statement in codeigniter with my logic</p>
  
  <pre><code>If $language === "english" 
  </code></pre>
  
  <p>it will no change</p>
  
  <pre><code>$q["question_title"] = $q["question_title"]
  </code></pre>
  
  <p>else</p>
  
  <p>it will change </p>
  
  <pre><code>$q["question_title"] = $q["question_title_**id**"]
  </code></pre>
  
  <p>the point is, i want to add <code>"_id"</code> in every php if <code>$languege = no "english"</code></p>
  
  <p>how to do that if php code inside of <code>"[]"</code> like <code>$q["question_title"]</code></p>
  
  <p><strong>OR</strong>
  from query.php</p>
  
  <pre><code>    // translation language
      $site_lang = $this-&gt;session-&gt;userdata('site_lang');
      if ( $site_lang === 'english') {
      $question['questions'][$i]['question_title'] = $q-&gt;quiz_text;
      } else {
      $question['questions'][$i]['question_title'] = $q-&gt;quiz_text_id;
      }
  </code></pre>
  
  <p>so if i use code in /views  and it read cookies in "english" it will get database "quiz_text" but if else it will get "quiz_text_id" from database
  but it not work in my query code.</p>