以下是一个使用PHP打印树形结构的实例,我们将通过递归函数来实现。
```php

function printTree($items, $indent = 0) {
foreach ($items as $item) {
echo str_repeat("
以下是一个使用PHP打印树形结构的实例,我们将通过递归函数来实现。
```php

function printTree($items, $indent = 0) {
foreach ($items as $item) {
echo str_repeat("