title: Codeigniter and decrypt in a foreach loop not working as expected
body: <p>So i have encrypted values which i'm pulling onto a view via a controller and model.
  The values are displaying encrypted in the view output.
  But when i try and decrypt the query values i'm not getting anything returned.</p>
  
  <p>It was originally in a table which i have now stripped back to the query row values.
  So just for testing, this works fine as I wanted to make sure the encryption functions were working:</p>
  
  <pre><code>      &lt;?php
        $plain_text = 'This is a plain-text message!';
        $ciphertext = $this-&gt;encryption-&gt;encrypt($plain_text);
          echo $ciphertext. '&lt;br&gt;';
          // Outputs: This is a plain-text message!
          echo $this-&gt;encryption-&gt;decrypt($ciphertext);     
        ?&gt;  
  </code></pre>
  
  <p>but this doesnt give any output:</p>
  
  <pre><code>                &lt;?php 
                  foreach ($data-&gt;result() as $systemadmin)
                  {
                    echo $this-&gt;encryption-&gt;decrypt($systemadmin-&gt;TC_FIRST_NAME);
                  }
                  ?&gt;
  </code></pre>
  
  <p>I know the encryption is functioning as I was able to encrypt the data going into the table.
  But when I try looping through the query object, it doesn't want to know.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks
  Matt</p>