Mine
public text v1 · immutable $struc = '';
foreach ($parent as $parent_l) {
$struc .= "[$parent_l]['child']";
}
$xarray[$struc] = array("catid"=>$xr['id'],"category"=>$xr['category'],"child"=>'');
$struc = '';
foreach ($parent as $parent_l) {
$struc .= "[$parent_l]['child']";
}
$xarray[$struc] = array("catid"=>$xr['id'],"category"=>$xr['category'],"child"=>'');