title: Passing an array of data to a private function in CodeIgniter/PHP?
body: <p>So I thought this should be easy, but, I'm struggling here...</p>
  <p>Here's my code:</p>
  <pre><code>function xy() {
    $array['var1'] = x;
    $array['var2'] = y;
    echo $this-&gt;_z;
  }
  
  function _z($array) {
    $xy = $x.$y;
    return $xy;
  }
  </code></pre>
  <p>So, why doesn't that seemingly simple code work? I know with views you can pass arrays and the variables are accessible in the views with just their array title, but, why doesn't it work in this case?</p>