<?php
function get_currency_rate($currencyRssUrl, $xmlItemTagID) {
// Get XML data from source
if (isset($currencyRssUrl)) {
$feed = file_get_contents($currencyRssUrl);
} else {
echo 'Feed not found. Check URL';
}
checkFeedExists($feed);
$xml = new SimpleXmlElement($feed);
$rate = get_date($xml);
$rate = get_rate($xml, $xmlItemTagID); //EUR
return $exchange;
}
?>
I set the second argument in a separate PHP script called cityConfig.php
<?php // Feed URL's // $theMoneyConverter = 'http://themoneyconverter.com/rss-feed/'; // City 3 // $city = 'Paris'; $currencyRateHeading3 = '1 Euro'; $currencyRateFeedCode = 'EUR'; $currencyRate3RssUrl = $theMoneyConverter . $currencyRateFeedCode . '/rss.xml'; $xmlItemTagID = 15; ?>
However, the get_currency_rate function errors saying that a second argument is expected. Any ideas where I'm going wrong?
Thanks in advance

New Topic/Question
Reply



MultiQuote




|