I have an array and want to get the values from it sorted and modified a bit to an other array, so I can make some comparison with yet another array
This is my array to begin with
Array (
[0] => WP_Term Object (
[term_id] => 10
...
[cat_name] => Klantenartikelen
[category_nicename] => klantenartikelen
[category_parent] => 0 )
[1] => WP_Term Object (
[term_id] => 11
...
[cat_name] => Overwin je Overgang blog
[category_nicename] => overwin-je-overgang-blog
[category_parent] => 10 )
)
I want to sort out the values of [cat_name] in to the new Array, remove one string from it ( blog) and then compare it with another Array, which looks like this
Array (
[1426787445] => Overwin je Overgang
[1426787487] => Overgangstransformatie
)
The problem with the second Array is that the key changes for every Array (membership secret code), but the values are always the same. (if it is too problematic to get the values from an Array like this, it can be hard-coded)
Then at the end I want to make a conditional logic with the comparison: if the value pairs of the two Array match, to echo a graphic element. There might be cases when one Array contains let's say 2 key/values pairs, and the other only 1, but it would need to pass true if one of the 2 is matching.
Any idea please, how this can be solved?