Su un codice tipo questo ottengo un Errore:
Notice: Trying to get property of non-object in /Users/..../pagina.php on line 36
La linea 36 è questa (e stessa cosa sulla riga uguale $Bid)
$Ask = $result->FunzioneDiUnServizioAPagamentoResult->CarQuote->Ask;
Codice PHP:
$marche = array("Audi", "Bmw", "Toyota", "Volswagen");
$valute = array("USD", "EUR", "GBP");
foreach ($marche as $val_marche)
{
echo "Marca :" . $val_marche . "
";
echo "<table border='0'>
<tr>
<th>Val</th>
<th>Bid</th>
<th>Ask</th>
";
foreach ($valute as $valore)
{
$param = array('Types' => "Audi,Totota,Bmw,Volswagen", 'Currency' => $valore);
$result = $client->FunzioneDiUnServizioAPagamento($param);
$Bid = $result->FunzioneDiUnServizioAPagamentoResult->CarQuote->Bid;
$Ask = $result->FunzioneDiUnServizioAPagamentoResult->CarQuote->Ask;
echo "<tr>";
echo " <td>$valore</td>
<td>$Bid</td>
<td>$Ask</td>";
echo "</tr>";
}
echo "</table>";
}
Come risolvo?