Skip to content

Instantly share code, notes, and snippets.

@n00shie
Last active August 29, 2015 14:11
Show Gist options
  • Save n00shie/f3f263beb8fa4c052d41 to your computer and use it in GitHub Desktop.
Save n00shie/f3f263beb8fa4c052d41 to your computer and use it in GitHub Desktop.
array_diff
$toData = $datum['to']['data'];
$toArray = [];
$tagArray = [];
foreach($toData as $toUser) {
array_push($toArray, $toUser['id']);
}
if(isset($datum['message_tags'])){
foreach($datum['message_tags'] as $tag) {
array_push($tagArray, $tag[0]['id']);
}
}
$result = array_diff($toArray, $tagArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment