I am trying to create an associative array that collects the following (existing on the db) information using this code:
$pro_xp = array();//array declaration
foreach ($profile_professional_experiences as $each_professional_experience) {
$pro_xp[] = ('title' => $each_professional_experience->title,
'company' => $each_professional_experience->company,
'industry' => $eachprofessional_experience->industry,
'time_period' => $each_professional_experience->time_period,
'duration' => $each_professional_experience->duration);}
This current code wins me a Parse Error message, which is not productive for me. I have seen other assignment questions, but none like this. I'm still new to PHP development, so if this is a rookie mistake, that would be why.
array...arraykeyword. You are creating a sub-array, but it is still a new array.$var = ('val', 'val');is not a valid PHP syntax.