This is my code:
if(is_array($ItemAttr["Actor"])){
$Actors = implode(", ", $ItemAttr["Actor"]);
} else {
$Actors = $ItemAttr["Actor"];
}
I'm getting undefined index: Actor in **line 1** and **line 3**
I guess i should use isset() function. Can anyone tell me how to combine that function with is_array() function..?
Not sure if this is what you mean but:
if( isset($ItemAttr["Actor"]) && is_array($ItemAttr["Actor"])){
....
}
In this case you are checking if the index exist before accessing its value.