I have this $firstarray :
Array
(
[1] => page->Accueil // <--- This $key
[2] => contact->Contact
[3] => page->Page Test
[4] => gallery->Test
[6] => article->test
)
And here's the $secondarray :
Array
(
[0] => Array
(
[0] => page
[1] => 1 //<--- With this $value
)
[1] => Array
(
[0] => contact
[1] => 2
)
[2] => Array
(
[0] => page
[1] => 3
)
[3] => Array
(
[0] => gallery
[1] => 4
)
[4] => Array
(
[0] => article
[1] => 6
)
)
I need to compare if the $key of the $firstarray equals to $value[] of the $secondarray, here's what I tried so far and didn't work :
foreach ($firstarray as $key => $value) {
if (array_key_exists($key, $secondarray)) {
echo "Ok";
}
}