Support the ongoing development of Laravel.io →
Database Eloquent Blade
Last updated 1 year ago.
0

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
0

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 ?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Niiwill niiwill Joined 24 Jun 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.