Hi guys,
I wanted to ask you to help me with (I believe it will be) short code where I need to compare 2 existing arrays I'm filling from the CSV files.
let's imagine 2 arrays:
$a = array('name|john', 'street|new street', 'city|washington', 'country|usa')
$b = array('new street', 'usa')
As you can see $b contains some of the values that are present in $a.
So now I would say I should use something like in_array or maybe foreach to compare $b with $a and the expected result is to get all the values from $a that are also in $b, but only the part in from of "|".
So the expected output based on the info above should be:
street
country
Hope this make sense.
Thanks a lot for your help
LT