I have this foreach loop that loops through the title and link of an xml file. I want to be able to sperate the title and put it into an array or assign each title to a variable. I also want to do the same thing with the link. Could any body help me out.
Here is my code.
<?php // Load and parse the XML document
$rss = simplexml_load_file('http://www.ubcmiami.org/podcasts/podcast.xml');
$title = $rss->channel->title;
// Here we'll put a loop to include each item's title and link
foreach ($rss->channel->item as $item) {
if($count <= 4)
{
$media_link = $item->guid;
$media_title = $item->title;
$count++;
}
}