I'm trying to add a ucfirst() function in my codeigniter controller so I'll get back a string with a first upper case letter. For some reason I keep getting a parse error:
Parse error: syntax error, unexpected '(', expecting ',' or ';' in ... on line 7 (the line where my ucfirst is).
Trying to change ucfirst() to ucfirst(strtolower($database)) or to ucwords($database) returning the same result.
My code is:
defined('BASEPATH') OR exit('No direct script access allowed');
class Somecontroller extends CI_Controller {
private $database = "some_database";
private $model = ucfirst($this->database)."_model";
...
}