You cannot use an expression to initialize a class property. The values of the two variables are not known until runtime, and therefore can't be used in the declaration. Instead, define them in the constructor.
public $head = array
(
// The title as a string literal is ok...
"title" => "blah",
"meta_title" => NULL,
"meta_content" => NULL
);
// Pass them to the constructor as parameters
public function __construct($meta_title, $meta_content)
{
// Initialize them in the constructor.
$this->head['meta_title'] = $meta_title;
$this->head['meta_content'] = $meta_content;
}
From the docs
Class member variables are called "properties". You may also see them referred to using other terms such as "attributes" or "fields", but for the purposes of this reference we will use "properties". They are defined by using one of the keywords public, protected, or private, followed by a normal variable declaration. This declaration may include an initialization, but this initialization must be a constant value--that is, it must be able to be evaluated at compile time and must not depend on run-time information in order to be evaluated.
$meta_content,