本文整理匯總了PHP中cookie::rcoll方法的典型用法代碼示例。如果您正苦於以下問題:PHP cookie::rcoll方法的具體用法?PHP cookie::rcoll怎麽用?PHP cookie::rcoll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cookie
的用法示例。
在下文中一共展示了cookie::rcoll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: childTree
function childTree($array, $parent)
{
$childs = '';
if (isset($array[$parent])) {
$display = cookie::rcoll(self::$tree_key, $parent);
$tpl_rr = self::$tree_item[self::$tree_key];
preg_match_all(self::$regex_sections, $tpl_rr, $out_sections);
foreach ($array[$parent] as $d => $v) {
$tpl_r = $tpl_rr;
/* sections */
if ($out_sections) {
foreach ($out_sections[1] as $g => $t) {
if (!isset($v[$t])) {
$tpl_r = str_replace($out_sections[0][$g], '', $tpl_r);
}
}
}
$tpl_r = preg_replace('/{{(.*?)}}/i', '', $tpl_r);
/* end sections */
$v['tree_child'] = self::childTree($array, $d);
$childs .= self::parseVars($tpl_r, $v);
}
$tree_tmpl = self::$tree_tmpl[self::$tree_key];
if ($parent != 0) {
$tree_tmpl = str_replace('{index}', $parent, $tree_tmpl);
$tree_tmpl = str_replace('{display}', $display, $tree_tmpl);
}
$childs = str_replace(self::$tree_item_r[self::$tree_key], $childs, $tree_tmpl);
}
return $childs;
}