Created
November 29, 2012 19:00
-
-
Save jakemcgraw/4171130 to your computer and use it in GitHub Desktop.
MY GOD, IT'S FULL OF array_* calls
This file contains 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 | |
return array_combine(array_keys($resp), array_map(function($children, $category_id) { | |
return array_filter($children, function($category) use ($category_id) { | |
return ($category_id == $category['parent_id'] && | |
strpos($category['name'], 'In Nav') === false); | |
}); | |
}, $resp, array_keys($resp))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment