Last active
October 14, 2019 08:18
-
-
Save ichadhr/6c7d270e1fc64df2d512cdc4ee9d9415 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function in_array_r($needle, $haystack, $strict = false) { | |
foreach ($haystack as $item) { | |
if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) { | |
return true; | |
} | |
} | |
return false; | |
} | |
// sample | |
foreach ($array as $k => $v) { | |
$val = $v['num_invoice']; | |
if(!in_array_r($val, $array2)) | |
{ | |
// return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment