本文整理汇总了PHP中tree::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP tree::remove方法的具体用法?PHP tree::remove怎么用?PHP tree::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tree
的用法示例。
在下文中一共展示了tree::remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$kf++;
echo "\t\t'" . $languages[$lang][0] . "' : { title : '" . $name . "' }";
}
echo "\n";
echo "\t}\n";
echo "}";
if (++$i < count($data)) {
echo ",";
}
echo "\n";
}
echo "\n]";
break;
case "delete":
$id = (int) str_replace("node_", "", $_REQUEST["id"]);
$tree->remove($id);
$db->query("DELETE FROM content WHERE id = " . $id);
echo "OK";
break;
case "create":
case "move":
$id = (int) str_replace("node_", "", $_REQUEST["id"]);
$ref_id = (int) str_replace("node_", "", $_REQUEST["ref_id"]);
$type = $_REQUEST["move_type"];
$result = $tree->move($id, $ref_id, $type);
if ($id == 0) {
foreach ($languages as $k => $lang) {
$db->query("INSERT INTO content (id,language,name,data) VALUES(" . $result . "," . $k . ",'New folder','')");
}
echo "node_" . $result;
}