<?php $currency = $argv[1]; $pars = simplexml_load_file("http://www.cbr.ru/scripts/XML_daily.asp"); $value=$pars->Valute[$currency]->Value; ?>
I run the script through the console, $ currency - the value transmitted at startup (numeric)
$ pars - parsing xml pages
$ value in the end is empty + Notice: Trying to get the property of non-object in / perl/includes/kurs.php on line 4
What is the problem?
thank
$currency = $argv[1]; var_dump($argv, $currency);
What is the output? - Sh4dow$pars
contains. - Sh4dow 6:49