试图访问数组内的对象

As a service result I have this array:

array(1) {
  [0]=>
  object(stdClass)#322 (2) {
    ["NOME_PROPRIEDADE"]=>
    string(8) "MATERIAL"
    ["VALORES"]=>
    object(stdClass)#323 (1) {
      ["ValoresPossiveisVO"]=>
      array(5) {
        [0]=>
        object(stdClass)#324 (1) {
          ["VALOR"]=>
          string(15) "CRISTAL INCOLOR"
        }
        [1]=>
        object(stdClass)#325 (1) {
          ["VALOR"]=>
          string(21) "CRISTAL FOTOCROMATICO"
        }
        [2]=>
        object(stdClass)#326 (1) {
          ["VALOR"]=>
          string(6) "RESINA"
        }
        [3]=>
        object(stdClass)#327 (1) {
          ["VALOR"]=>
          string(13) "POLICARBONATO"
        }
        [4]=>
        object(stdClass)#328 (1) {
          ["VALOR"]=>
          string(6) "TRIVEX"
        }
      }
    }
  }

I'm accessing its values like this:

foreach ($res->ObterValoresDosTiposDeProdutoParaWebSiteResult->PropriedadesPossiveisVO as $material)
{
echo $material->NOME_PROPRIEDADE; //it returns me MATERIAL, as expected
}

It works but when I try to access $material->VALORES is returns me that it is a empty array: array(o){}

What am I doing wrong?

Thanks in advance for any help.

Because the outermost item ($materail) is an array, its internals need to be accessed by [] index. You need $material[0]->VALORES, which is then an object containing objects and arrays. So to get its internal items,

$material[0]->VALORES->ValoresPossiveisVO[0]->VALOR;
// "CRISTAL INCOLOR"