R
Size: a a a
L
L
foreach ($cat_hierarchy as $cat) {
loopItemPrice($cat, 1);
foreach ($cat->children as $children_2) {
loopItemPrice($children_2, 2);
foreach ($children_2->children as $children_3) {
loopItemPrice($children_3, 3);
foreach ($children_3->children as $children_4) {
loopItemPrice($children_4, 4);
}
}
}
}L
L
function getValueArrayComplexity($arr, $count = 1)
{
$count++;
foreach ($arr->children as $val) {
if (!is_object($arr->children)) {
loopItemPrice($val, $count);
getValueArrayComplexity($val);
}
}
}
foreach ($cat_hierarchy as $cat) {
loopItemPrice($cat, 1);
getValueArrayComplexity($cat);
}
L
L
L
SP
L
V
ЕП
ЕП
КГ