I want to access the 'url' attribute in the media:content element below. I am pretty sure this gives me the media:content, but I can not seem to get the url (see what I tried below):
$theContent = $item->children('media', true)->content;
xml:
<item>
<media:content type="image/jpeg" url="my url" />
</item>
I have tried variations:
$theURL = $item->children('media', true)->content['url'];
and
$mediaItem=$item->children('media', true)->content;
$contentItem=$mediaItem->children('content', true);
$url = $contentItem['url'];
No luck. ??