Skip to content

Instantly share code, notes, and snippets.

@lornajane
Created January 30, 2012 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lornajane/1704335 to your computer and use it in GitHub Desktop.
Save lornajane/1704335 to your computer and use it in GitHub Desktop.
foreach ($thing as $value) {
if(!empty($value)) {
if(is_array($value)) {
foreach($value as $subitem) {
$array[] = $subitem;
}
} else {
$array[] = $value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment