Hi
I have to find an array key exists in an array. My array structure is
$result (which is a result from a webservice).
Then I have to iterate the values of the in a foreach like
foreach($result['GetSessionListResult']['diffgram']['NewDataSet']['Table'] as $item).
{
}
. Ok Then my problem is sometimes webserice maynot have the out put. Then it only have result $result. This time my foreach will throw an undefined offset error. Then I put a isset checking like this.
if(isset($result['GetSessionListResult']['diffgram']['NewDataSet']['Table']))
{
}
But it shows the same error again. Then I google and found 'array_key_exists'. But I dont know how to use this in my case. Can anyone help me on this issue?