Skip to content

Instantly share code, notes, and snippets.

@skehlet
Created January 7, 2015 21:51
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 skehlet/a35f0436ba071bd7feca to your computer and use it in GitHub Desktop.
Save skehlet/a35f0436ba071bd7feca to your computer and use it in GitHub Desktop.
function my_explode($delimiter, $string, $limit = null) {
$array = call_user_func_array('explode', func_get_args());
if (count($array) === 1 && strlen($array[0]) === 0) {
return array();
}
return $array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment