Skip to content

Instantly share code, notes, and snippets.

@BinaryKitten
Created January 8, 2013 11:40
Show Gist options
  • Save BinaryKitten/4483148 to your computer and use it in GitHub Desktop.
Save BinaryKitten/4483148 to your computer and use it in GitHub Desktop.
<?php
$iterator = new RecursiveIteratorIterator($nav, RecursiveIteratorIterator::CHILD_FIRST);
$activePages = array();
foreach ($iterator as $page) {
if ($page->isActive(true)) {
$activePages[] = $page;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment