do a for each loop like,
$temp = [[{"lessonTypeId":"1"},{"lessonTypeId":"2"}]];
$data = array();
foreach ($temp as $key => $value) {
$data[] = $value->lessonTypeId;
}
//now $data has your expected result
forae>AthiKrishnan said:
do a for each loop like,
$temp = [[{"lessonTypeId":"1"},{"lessonTypeId":"2"}]]; $data = array(); foreach ($temp as $key => $value) { $data[] = $value->lessonTypeId; } //now $data has your expected result
FOREACH LOOP TO PREFORM IN VIEW ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community