PHP gevorderde |
|
ik heb nu dit en dat werkt helaas niet:
<?PHP
function getBreadcrumbItem($breadcrumb)
{
$sQuery = " SELECT
id,
parent_id,
title,
isagroup
FROM
`page`
WHERE
id = '".$breadcrumb."'
AND
isagroup = true
";
$rs = $this->conn->GetRow($sQuery);
return $rs;
}
function getBreadcrumb($breadcrumb)
{
$i = 0;
while($breadcrumb != '0'){
//$breadcrumbItem = $this->getBreadcrumbItem($breadcrumb);
$breadcrumbs[$i]['items'] = $this->getBreadcrumbItem($breadcrumb);
$i++;
}
var_dump($breadcrumbs);
//return $breadcrumbs;
}
?>
<?PHP function getBreadcrumbItem($breadcrumb) { $sQuery = " SELECT id, parent_id, title, isagroup FROM `page` WHERE id = '".$breadcrumb."' AND isagroup = true "; $rs = $this->conn->GetRow($sQuery); return $rs; } function getBreadcrumb($breadcrumb) { $i = 0; while($breadcrumb != '0'){ //$breadcrumbItem = $this->getBreadcrumbItem($breadcrumb); $breadcrumbs[$i]['items'] = $this->getBreadcrumbItem($breadcrumb); $i++; } //return $breadcrumbs; } ?>
|