Skip to content

I have one of this data, want to show you like that. #2

@km3945

Description

@km3945

I have one of this data, want to show you like that.
please help me.

.
│
└── first
    ├── fist value
    ├── second value
    ├── fist sub
    │   ├── fist sub value
    │   ├── second sub value
    │   └── fist sub sub
    │       ├── fist sub sub value
    │       └── second sub sub value
    └── second
        ├── second value
        └── second second value
$tree = array(
			array(
				'id'     => '1',
				'pid'    => '0',
				'name'   => 'text1',
				'_child' => array(
					array(
						'id'     => '2',
						'pid'    => '1',
						'name'   => 'text2',
						'_child' => array(
							array(
								'id'     => '3',
								'pid'    => '2',
								'name'   => 'text3',
								'_child' => array(
									array(
										'id'     => '4',
										'pid'    => '3',
										'name'   => 'text4',
										'_child' => array(
											array(
												'id'     => '7',
												'pid'    => '4',
												'name'   => 'text7',
												'_child' => array(
													array(
														'id'   => '8',
														'pid'  => '7',
														'name' => 'text8',
													),
													array(
														'id'   => '13',
														'pid'  => '7',
														'name' => 'text13',
													),
												),
											),
											array(
												'id'   => '12',
												'pid'  => '4',
												'name' => 'text12',
											),
										),
									),
								),
							),
						),
					),
					array(
						'id'   => '9',
						'pid'  => '1',
						'name' => 'text9',
					),
					array(
						'id'   => '10',
						'pid'  => '1',
						'name' => 'text10',
					),
					array(
						'id'   => '11',
						'pid'  => '1',
						'name' => 'text11',
					),
				),
			),
		);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions