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.