Hi,
Can anyone explain to me why the following is resulting in a syntax error (unexpected '=')?
protected function processDates()
{
foreach($this->dates as $name => $unitprefix)
{
$this->$unitprefix.'year' = '';
$this->$unitprefix.'month' = '';
$this->$unitprefix.'day' = '';
}
}
Obviously I'm not going to leave these values blank but before I continue, I need to fix the current issue.
Any advice appreciated.
Thanks.