title: Cannot fetch some special characters from mysql table in codeigniter
body: <p>I have a issue while fetching some data from the mysql table whose data type is "text".
  What i have is a portal for instructor and student. Student will ask question and the instructor can answer them by text or put some code in that.
  Say If a student has asked a demo code for php echo so the instructor can put the code</p>
  
  <pre><code>&lt;?php echo "Hello World!" ?&gt;
  </code></pre>
  
  <p>The issue is this answer is saved in database but when i'm trying to fetch, I can't fetch the result.
  The problem is if I put '&lt;' &amp; '?' together the code is not fetched but when I put space in between them then it is fetched.
  I have tried many things like my charset in config of database</p>
  
  <pre><code>'char_set' =&gt; 'UTF8',
  'dbcollat' =&gt; 'utf8_general_ci',
  </code></pre>
  
  <p>Then my meta</p>
  
  <pre><code>&lt;meta charset=utf-8"/&gt;
  </code></pre>
  
  <p>I have tried everything but i cant really fetch it.
  My model code to fetch the answer is</p>
  
  <pre><code>public function getAnswer($questionId)
  {
      $this-&gt;db-&gt;select('answer');
      $this-&gt;db-&gt;from('tbl_que_ans as qa');
      $this-&gt;db-&gt;where('qa.questionId', $questionId);
      $query = $this-&gt;db-&gt;get();
      $query_result = $query-&gt;row();
      return $query_result;
  }
  </code></pre>
  
  <p>While displaying it in the view i'm using foreach</p>
  
  <pre><code>&lt;?php foreach ($answeredQuestions as $key) {
        echo $key-&gt;answer;
  ?&gt;
  </code></pre>
  
  <p>This how my datatable looks:
  <a href="https://i.stack.imgur.com/l4OUy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l4OUy.png" alt="There is data in answer column. Thats how my data is going to be."></a>
  I'm not able make it work. Can somebody please help me in this.
  Thanks already!!</p>