Skip to content

Instantly share code, notes, and snippets.

@nelsonsar
Created November 6, 2013 18:21
Show Gist options
  • Save nelsonsar/7341390 to your computer and use it in GitHub Desktop.
Save nelsonsar/7341390 to your computer and use it in GitHub Desktop.
Chora Rubão!
function porra($caralho)
{
foreach ($caralho as $k => $v) {
if ($k == 'article') {
if (isset($v['id']) && $v['id'] == '1002') {
echo 'caralho' . PHP_EOL;
return;
}
}
if (is_array($v)) {
porra($v);
}
}
}
porra($a);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment