您可以帮助循环循环此stdClass吗?我只想打印值。
stdClass Object ( [GetInfoResult] => stdClass Object ( [string] => Array ( [0] => My Value 1 [1] => My Value 2 [2] => My Value 3 [3] => My Value 4 [4] => My val 5 [5] => My val 6 [6] => My last val ) ) )
示例:
答案 0 :(得分:0)
要打印的值在对象中嵌套的数组中。只需访问数组并使用foreach
。
foreach ($object->GetInfoResult->string as $string) {
echo $string;
}