It's my problem.
$arr_1 = ["a", "b", "c"];
$arr_2 = [
[
"word" => "g"
],
[
"word" => "a"
]
]
So i want check
if $arr_2[n]["word"] value same $arr_1, then return true
Thanks you for help !!
this should basically be the contents of your function
foreach($arr_2 as $words){
if(in_array($words['word'], $arr_1)
return true;
}
array_search($words, array_column($arr_2, "word")) in for loop, But your solution is very nice, thanks you again !!
array_diff();to compare$result = array_diff($a1,$a2); print_r($result);