芝麻web文件管理V1.00
编辑当前文件:/www/wwwroot/shphe-en.com/wp-content/plugins/admin-columns-pro/classes/inline-edit/inc/arrays.php
$parentKey == $parentId ) { $indent[$i] = $v; $indent[$i]->$childrenKey = CACIE_Arrays::array_nest( $array, $v->$selfKey, $parentKey, $selfKey, $childrenKey ); $i++; } } return $indent; } public static function convert_nesting_to_indentation( $nested_array, $indent_key, $children_key = 'children', $depth = 0 ) { $i = 0; $indented_array = array(); foreach ( $nested_array as $index => $value ) { if ( isset( $value->{$children_key} ) ) { $newpart = CACIE_Arrays::convert_nesting_to_indentation( $value->{$children_key}, $indent_key, $children_key, $depth + 1 ); unset( $value->{$children_key} ); $value->{$indent_key} = str_repeat( '-', $depth ) . $value->{$indent_key}; $indented_array[] = $value; $indented_array = array_merge( $indented_array, $newpart ); } else { $indented_array[] = $value; } } return $indented_array; } }