title: Passing parameters when initializing a library in Codeigniter
body: <p>I am really new to Codeigniter, and just learning from scratch. In the CI docs it says:</p>
  
  <pre><code>$params = array('type' =&gt; 'large', 'color' =&gt; 'red');
  $this-&gt;load-&gt;library('Someclass', $params);
  </code></pre>
  
  
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Someclass {
  
      public function __construct($params)
      {
          // Do something with $params
      }
  }
  </code></pre>
  
  <p>Can you give me simple example how to pass data from controller to external library using array as parameters? I'd like to see a simple example.</p>