本文整理匯總了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;
}