Skip to content

Instantly share code, notes, and snippets.

@buryat
Created October 5, 2012 17:50
Show Gist options
  • Save buryat/3841291 to your computer and use it in GitHub Desktop.
Save buryat/3841291 to your computer and use it in GitHub Desktop.
php madskillz
$a = array(…);
$b = 1;
foreach ($a as $v) {
if ($b) {
$a = array();
$b = 0;
}
$a[] = f($v);
}
unset($b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment