Currently I am setting an array up like this...
public function setup_array()
{
$columns = array(
'date1' => '2014-01-24',
'date2' => '2014-02-14',
'date3' => '2014-03-11',
'date4' => '2014-04-01'
);
return $columns;
}
This works but what I would like to use variables that are already set in place of the dates like so...
public function setup_array()
{
$columns = array(
'date1' => '$date1',
'date2' => '$date1',
'date3' => '$date1',
'date4' => '$date1'
);
return $columns;
}
I have tried to do this an although the $date variables are avaliable and set, it actually prints $date1 instead or retrieving the variable value itself.
What am I doing wrong?
'date1' => $date1- no quotes