Skip to content

Instantly share code, notes, and snippets.

@dilab
Last active September 6, 2015 03:36
Show Gist options
  • Save dilab/b7355bcac96ede6dcc6d to your computer and use it in GitHub Desktop.
Save dilab/b7355bcac96ede6dcc6d to your computer and use it in GitHub Desktop.
Implode array, but smart enough to filter out empty values.
function implode_filter($glue , $pieces) {
return implode($glue, array_filter($pieces));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment