Skip to content

Instantly share code, notes, and snippets.

@Inzman
Created August 23, 2018 08:29
Show Gist options
  • Select an option

  • Save Inzman/755283ea16ffe0f40a128ce73a6ac633 to your computer and use it in GitHub Desktop.

Select an option

Save Inzman/755283ea16ffe0f40a128ce73a6ac633 to your computer and use it in GitHub Desktop.
Remove key from array by value
$to_remove = array('john');
$result = array_diff($your_array_name, $to_remove);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment