Welcome Guest, Not a member yet? Register   Sign In
function list()
#1

[eluser]gigas10[/eluser]
Hello, not sure why codeigniter is doing this, as list is not a reserved function name.

my controller is as follows:

Code:
<?php
class Exercise extends Controller
{
    function Exercise()
    {
        parent::Controller();
    }

    function add()
    {
        $this->load->view('admin/addexercise');
    }

    function list()
    {
        $this->load->view('admin/listexercise');
    }

    function delete()
    {
        $this->load->view('admin/deleteexercise');
    }
}

When I run any of the functions in this controller, I get the following error:
Code:
Parse Error: parse error, expecting `T_STRING' in C:\wamp\www\weight\system\application\controllers\admin\exercise.php on line 13

Line 13 is the function list() line.
#2

[eluser]n0xie[/eluser]
list is a PHP reserved function name
#3

[eluser]gigas10[/eluser]
Ahhh, my fault.




Theme © iAndrew 2016 - Forum software by © MyBB