for($i=1;$i<=$entry_amt;$i++) { echo " RESULT #$i\n"; echo " Published: " . $xml->entry[$i-1]->published . "\n"; echo " Updated: " . $xml->entry[$i-1]->updated . "\n"; echo " Title: " . $xml->entry[$i-1]->media_group->media_title . "\n"; echo " Description: " . $xml->entry[$i-1]->media_group->media_description . "\n"; echo " Author: " . $xml->entry[$i-1]->author->name . " (" . $xml->entry[$i-1]->author->uri . ")\n"; echo " Keywords: " . $xml->entry[$i-1]->media_group->media_keywords . "\n"; echo " Duration(sec): " . $xml->entry[$i-1]->media_group->yt_duration['seconds'] . "\n"; // Right here I want it to check every value in$xml->entry[$i-1]->media_group->media_content like this: if($xml->entry[$i-1]->media_group->media_content[$n]['yt_format'] == '3') {blah} }