Created
August 24, 2011 09:58
-
-
Save Stanton/1167702 to your computer and use it in GitHub Desktop.
Just for funzies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Now this is a story, all about how my $dirTree got flipped-turned upside down | |
$reversed_dirTree = array_reverse($dirTree); | |
// and I'd like to take a minute, just sit right there, I'll tell you how loop the object to get the default category down there. | |
foreach ($reversed_dirTree as $dirTree_category) { | |
if (in_array($dirTree_category->name, $directory_category_names)) { | |
$parent_cat_name = $dirTree_category->name; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment