I am doing laravel project. I have one sql query as,
$catcount=2;
for($i=0;$i<$catcount;$i++) {
$subCat[] = Category::where('parent_id', '=', $userCategory[$i])->pluck('id');
}
$subCat returns an array as,
[[54,55,56,57,58],[48,49,50,51,52]]
I want this array as a single dimensional array like,
[54,55,56,57,58,48,49,50,51,52]
I am not getting how to do this, Please help and thanks in advance.
array_merge($subCat[0],$subCat[1])