Iam (Zend framework kullanarak) bir menü oluşturma (zend_navigation)
what iam doing is getting the page as label if the page has the value "myPage" than then iam setting the new URI with the page as expected
$it = new RecursiveIteratorIterator(
$container, RecursiveIteratorIterator::SELF_FIRST);
foreach ($it as &$page) {
$label = $page->label;
if($label = "MyPage"){
$newuri = "mypage.php?stcode=".$stcode."&cde=".$cde;
$page->setUri($newuri);
}
}
In the above statement iam getting an error "An iterator cannot be used with foreach by reference". I want to use reference so that based on the label i can point the page to new uri
Şimdi benim sorunum ve menüsündeki tüm menü öğeleri aynı URI alıyorsanız.