Last active
August 29, 2015 14:11
-
-
Save n00shie/f3f263beb8fa4c052d41 to your computer and use it in GitHub Desktop.
array_diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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