阅读背景:

html作为php变量未正确呈现

来源:互联网 

Having the following method

有以下方法

  public function printDropdownTree($tree, $r = 0, $p = null) {
        foreach ($tree as $i => $t) {
            $dash = ($t['parent'] == 0) ? '' : str_repeat('-', $r) . ' ';
            printf("\t<option value='%d'>%s%s</option>\n", $t['id'], $dash, $t['name']);
            if ($t['parent'] == $p) {
                // reset $r
                $r = 0;
            }
            if (isset($t['_children'])) {
                $this->printDropdownTree($t['_children'], ++$r, $t['parent']);
            }
        }
    }
  public



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: