I am trying to print out the field name: entity name and getting an error saying "Trying to get property of non-object"
$accrdNo = '3001044';
$url = "http://localhost:8080/webservice/index.php?id=$accrdNo";
$client = curl_init($url);
curl_setopt($client, CURLOPT_URL, $url);
curl_setopt($client, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($client, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($client);
$encoded = json_encode($result, true);
$decoded = json_decode($encoded, true);
echo $decoded->{'va_entity_name'};