Skip to content

Instantly share code, notes, and snippets.

@xwero
Created March 31, 2011 11:19
Show Gist options
  • Select an option

  • Save xwero/896194 to your computer and use it in GitHub Desktop.

Select an option

Save xwero/896194 to your computer and use it in GitHub Desktop.
Check if one of the fields has data
function one_not_empty($array,$fields)
{
$fields = func_get_args();
array_shift($fields);
foreach($fields as $field)
{
if(Valid::not_empty($array[$field]))
{
return true;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment