I have an array called all_teams which contains the following
Array
(
[33448] => Team1
[33466] => Team2
[33467] => Team3
[33476] => Team4
[33495] => Team5
)
I do a check within a foreach
to check if teamId
is in the array keys. If the array key exists I want to display the key's value.
So far I have
if(array_key_exists(intval($team['teamId']), $all_teams)) {
echo 'set';
// array key value needs to be here
} else {
echo 'not set';
}