The Line 2 fetches the value fall 2017 and line 3 fetches fall 2018 and stores into the array semesters_info.
How to fetch Line 2 and line 3 data (fall 2017,fall 2018) and store into the array?
$semesters_info = (array) null;
$semesters_info += [$semesters->fall_term_cd => $semesters->fall_term_name];
$semesters_info += [$semesters->spring_term_cd => $semesters->spring_term_name];
I have tried but errors out to array to string conversion error.-
$test1= [$semesters->spring_term_cd => $semesters->spring_term_name];
$test2 = [$semesters->fall_term_cd => $semesters->fall_term_name];
$semesters_info += $test1.''.$test2;
Currently Semester info will store Fall 2017 and Spring 2018, I would need a third value which is Fall 2017 Spring 2018.