title: Codeigniter return Undefined variable codeigniter
body: <p>I'm trying to send a array data from a controller to a view.
  but, a log of the framework accuse: Message: Undefined variable: var.</p>
  
  <p>this is the "fake data" of my controller, the "n":</p>
  
  <pre><code>class Produtos extends CI_Controller{
  
  
  public function index()
  {
      $n= [];
      $form = [
          "greetings" =&gt; "welcome",
          "user" =&gt; "Name:",
          "password" =&gt; "Pass:",
          "copyright" =&gt; "2016"
      ];
  
      array_push($n, $form);
  
      $dados = ["n" =&gt; $n];
  
      $this-&gt;load-&gt;view("n/index.php");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and, my view named "n" have only a var_dump:</p>
  
  <pre><code>&lt;?= var_dump($n);&gt;
  </code></pre>
  
  <p>someone can help?</p>