Codeigniter, can't recognize $data through controller : <p>I am getting this error:</p>

<pre><code>    An uncaught Exception was encountered
Type: ParseError

Message: syntax error, unexpected '$data' (T_VARIABLE), expecting function (T_FUNCTION)
</code></pre>

<p>It says it's at line 32, here is my controller</p>

<pre><code>&lt;?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Page extends CI_Controller {

    public function index($slug = NULL){
        if($slug){
                $this-&gt;db-&gt;where('p_slug', $slug);
        }else {
            $this-&gt;db-&gt;where('p_frontpage', 1);
        }

        $sqlQuery = $this-&gt;db-&gt;get('pages');

        $data = $sqlQuery-&gt;row_array();
        $data['page_title'] = "Aske's side";
        $data['nav'] = $this-&gt;db-&gt;get('pages')-&gt;result_array();

        $this-&gt;parser-&gt;parse('template/header', $data);
        $this-&gt;parser-&gt;parse('template/banner', $data);
        $this-&gt;parser-&gt;parse('template/footer', $data);
        $this-&gt;parser-&gt;parse('view_page', $data);

    }
    public function create(){
        //Test af formular
        if ($this-&gt;input-&gt;post()) {
                echo "test";
            }
        }
        //Globale elementer
        $data['page_title'] = "Aske's side";
        $data['nav'] = $this-&gt;db-&gt;get('pages')-&gt;result_array();
        //Templates til admin
        $this-&gt;parser-&gt;parse('template/header', $data);
        $this-&gt;parser-&gt;parse('template/banner', $data);
        $this-&gt;parser-&gt;parse('template/footer', $data);
        $this-&gt;parser-&gt;parse('create_view', $data);
    }
}
</code></pre>

<p>So the controller is loading 2 views, view_page.php &amp; create_view.php, but I can't go any further with this error.
I hope someone can help me here.</p>

<p>Thank's in advance.</p>

<p>KR
Aske</p>
