Skip to content

Instantly share code, notes, and snippets.

@objectivehtml
Created December 17, 2013 02:50
Show Gist options
  • Select an option

  • Save objectivehtml/7999190 to your computer and use it in GitHub Desktop.

Select an option

Save objectivehtml/7999190 to your computer and use it in GitHub Desktop.
$subject = 'your_col_name';
$has_no_value = TRUE;
foreach($array as $index => $value)
{
if($index == $subject && !empty($value))
{
$has_no_value = FALSE;
}
}
if($has_no_value)
{
foreach($array as $value)
{
unset($array[$subject]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment